2013-04-10 18:40:56 -04:00
|
|
|
// 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";
|
2016-03-09 12:17:50 -05:00
|
|
|
t.insert({str: string});
|
2013-04-10 18:40:56 -04:00
|
|
|
assert.eq(t.findOne().str, string);
|
2016-03-09 12:17:50 -05:00
|
|
|
assert.eq(t.findOne().str.length, string.length); // just to be sure
|