summaryrefslogtreecommitdiff
path: root/jstests/null_field_name.js
blob: 7fa14b0a1bc9d5f9b08a35c45dfdf1773ab01c54 (plain)
1
2
3
4
5
6
7
8
// SERVER-10313: Test that null char in field name causes an error when converting to bson
assert.throws( function () { Object.bsonsize({"a\0":1}); },
               null,
               "null char in field name");

assert.throws( function () { Object.bsonsize({"\0asdf":1}); },
               null,
               "null char in field name");