summaryrefslogtreecommitdiff
path: root/jstests/basic3.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/basic3.js')
-rw-r--r--jstests/basic3.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/jstests/basic3.js b/jstests/basic3.js
new file mode 100644
index 0000000..b1ebafd
--- /dev/null
+++ b/jstests/basic3.js
@@ -0,0 +1,24 @@
+
+t = db.getCollection( "foo" );
+
+t.find( { "a.b" : 1 } ).toArray();
+
+ok = false;
+
+try{
+ t.save( { "a.b" : 5 } );
+ ok = false;
+}
+catch ( e ){
+ ok = true;
+}
+assert( ok , ". in names aren't allowed doesn't work" );
+
+try{
+ t.save( { "x" : { "a.b" : 5 } } );
+ ok = false;
+}
+catch ( e ){
+ ok = true;
+}
+assert( ok , ". in embedded names aren't allowed doesn't work" );