summaryrefslogtreecommitdiff
path: root/jstests/update3.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/update3.js')
-rw-r--r--jstests/update3.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/update3.js b/jstests/update3.js
index 4dfeb90..e49f050 100644
--- a/jstests/update3.js
+++ b/jstests/update3.js
@@ -21,3 +21,9 @@ f.drop();
f.save( {'_id':0} );
f.update( {}, {$set:{'_id':5}} );
assert.eq( 0, f.findOne()._id , "D" );
+
+// Test replacement update of a field with an empty string field name.
+f.drop();
+f.save( {'':0} );
+f.update( {}, {$set:{'':'g'}} );
+assert.eq( 'g', f.findOne()[''] , "E" );