summaryrefslogtreecommitdiff
path: root/jstests/set1.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-08-26 00:16:16 -0400
committerEliot Horowitz <eliot@10gen.com>2009-08-26 00:16:16 -0400
commitfa7fd75fc747087d67aff85afd20a5ee1348a022 (patch)
treebec15f40ff20894a4eb8fcfb2597a0fd714a9622 /jstests/set1.js
parent99b20a0b6b99c9070afe533a65dc1ec3cba4eea9 (diff)
downloadmongo-fa7fd75fc747087d67aff85afd20a5ee1348a022.tar.gz
broken test for SERVER-261
Diffstat (limited to 'jstests/set1.js')
-rw-r--r--jstests/set1.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/jstests/set1.js b/jstests/set1.js
new file mode 100644
index 00000000000..f1dc64328ed
--- /dev/null
+++ b/jstests/set1.js
@@ -0,0 +1,16 @@
+
+t = db.set1;
+t.drop();
+
+t.insert( { _id : 1, emb : {} });
+
+t.update( { _id : 1 }, { $set : { emb : { 'a.dot' : 'data'} }});
+assert.eq( 1 , t.findOne().emb.keySet().length , "A" );
+assert.eq( "a.dot" , t.findOne().emb.keySet()[0] , "B" );
+
+t.update( { _id : 1 }, { $set : { 'emb.b' : { dot : 'data'} }});
+assert.eq( 2 , t.findOne().emb.keySet().length , "C" );
+//assert.eq( "a.dot" , t.findOne().emb.keySet()[0] , "D" );
+//assert.eq( "b" , t.findOne().emb.keySet()[0] , "E" );
+
+