mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
test file
This commit is contained in:
parent
7f75c1b5f7
commit
bc5ea71d55
17
jstests/tilde.js
Normal file
17
jstests/tilde.js
Normal file
@ -0,0 +1,17 @@
|
||||
t = db.tilde;
|
||||
t.drop();
|
||||
|
||||
print("Part 2");
|
||||
t.insert( { } );
|
||||
t.insert( { x : [1,2,3] } );
|
||||
t.insert( { x : 99 } );
|
||||
t.update( {x : 2}, { $inc : { "~" : 1 } } , false, true );
|
||||
//assert( t.findOne({x:1}).x[1] == 3, "tilde broken?" );
|
||||
printjson( t.findOne({x:1}) );
|
||||
|
||||
print("Part 2");
|
||||
|
||||
t.insert( { x : { y : [8,7,6] } } )
|
||||
t.update( {'x.y' : 7}, { $inc : { "x.~" : 1 } } , false, true )
|
||||
printjson( t.findOne({"x.y" : 8}) );
|
||||
// assert( t.findOne({"x.y" : 8}).x.y[1] == 8, "tilde nested" );
|
Loading…
Reference in New Issue
Block a user