Espruino/tests/test_null_in_strings.js
Michael Duerinckx 7f5308590b Rename numbered tests to something more descriptive - closes #16
test077 is the only one I really couldn't figure out what it was meant
to test.
2014-03-01 22:15:28 +00:00

13 lines
176 B
JavaScript

// Null in strings
var a = [
"\0", 1,
"A\0", 2,
"\0A", 2,
"\0\0\0\0\0\0\0\0A", 9
];
result = 1;
for (i=0;i<a.length;i+=2)
if (a[i].length != a[i+1]) result=false;