summaryrefslogtreecommitdiff
path: root/jstests/core/string_with_nul_bytes.js
blob: e72cc0b6dc1e53124e67748dc31ec2ef517fa61c (plain)
1
2
3
4
5
6
7
8
9
// SERVER-6649 - issues round-tripping strings with embedded NUL bytes

t = db.string_with_nul_bytes.js;
t.drop();

string = "string with a NUL (\0) byte";
t.insert({str: string});
assert.eq(t.findOne().str, string);
assert.eq(t.findOne().str.length, string.length);  // just to be sure