summaryrefslogtreecommitdiff
path: root/jstests/evala.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-11-10 13:40:21 -0500
committerEliot Horowitz <eliot@10gen.com>2009-11-10 13:40:21 -0500
commit8af511ef9b8fab64893960b776b3682de6fb7932 (patch)
tree863a18616b437376c36960f64c31e556765255c8 /jstests/evala.js
parent62ff89ad69bbc480b0bac3bd20df43636d8b1efa (diff)
downloadmongo-8af511ef9b8fab64893960b776b3682de6fb7932.tar.gz
handle comments at the beginning of code SERVER-398
Diffstat (limited to 'jstests/evala.js')
-rw-r--r--jstests/evala.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/jstests/evala.js b/jstests/evala.js
new file mode 100644
index 00000000000..ed72582fbb6
--- /dev/null
+++ b/jstests/evala.js
@@ -0,0 +1,9 @@
+
+t = db.evala;
+t.drop()
+
+t.save( { x : 5 } )
+
+assert.eq( 5 , db.eval( "function(){ return db.evala.findOne().x; }" ) , "A" );
+assert.eq( 5 , db.eval( "/* abc */function(){ return db.evala.findOne().x; }" ) , "B" );
+