diff options
Diffstat (limited to 'jstests/ne1.js')
-rw-r--r-- | jstests/ne1.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/ne1.js b/jstests/ne1.js new file mode 100644 index 00000000000..e1c5656b5c8 --- /dev/null +++ b/jstests/ne1.js @@ -0,0 +1,11 @@ + +t = db.ne1; +t.drop(); + +t.save( { x : 1 } ); +t.save( { x : 2 } ); +t.save( { x : 3 } ); + +assert.eq( 2 , t.find( { x : { $ne : 2 } } ).itcount() , "A" ); +t.ensureIndex( { x : 1 } ); +assert.eq( 2 , t.find( { x : { $ne : 2 } } ).itcount() , "B" ); |