summaryrefslogtreecommitdiff
path: root/jstests/unset2.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/unset2.js')
-rw-r--r--jstests/unset2.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/jstests/unset2.js b/jstests/unset2.js
index a381d5e4f85..3d706682724 100644
--- a/jstests/unset2.js
+++ b/jstests/unset2.js
@@ -7,4 +7,9 @@ assert.eq( ["a","b","c"], t.findOne().a );
t.update( {}, {$unset:{"a.1":1}} );
assert.eq( ["a","c"], t.findOne().a );
t.update( {}, {$unset:{"a.0":1}} );
-assert.eq( ["c"], t.findOne().a ); \ No newline at end of file
+assert.eq( ["c"], t.findOne().a );
+
+t.drop();
+t.save( {a:["a","b","c","d","e"]} );
+t.update( {}, {$unset:{"a.2":1},$set:{"a.3":3,"a.4":4,"a.5":5}} );
+assert.eq( ["a","b",3,4,5], t.findOne().a ); \ No newline at end of file