summaryrefslogtreecommitdiff
path: root/jstests/js5.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/js5.js')
-rw-r--r--jstests/js5.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/js5.js b/jstests/js5.js
new file mode 100644
index 00000000000..84770d72da2
--- /dev/null
+++ b/jstests/js5.js
@@ -0,0 +1,10 @@
+
+t = db.jstests_js5
+t.drop();
+
+t.save( { a : 1 } )
+t.save( { a : 2 } )
+
+assert.eq( 2 , t.find( { "$where" : "this.a" } ).count() , "A" );
+assert.eq( 0 , t.find( { "$where" : "this.b" } ).count() , "B" );
+assert.eq( 0 , t.find( { "$where" : "this.b > 45" } ).count() , "C" );