mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
401 B
27 lines
401 B
12 years ago
|
|
||
|
/*===
|
||
|
false
|
||
|
false
|
||
|
true
|
||
12 years ago
|
false
|
||
|
true
|
||
|
false
|
||
12 years ago
|
===*/
|
||
|
|
||
|
/* Testcase for a bug in comparing strings with embedded NULs.
|
||
|
* strncmp(), which stops comparing at NULs, was used.
|
||
|
*/
|
||
|
|
||
|
try {
|
||
|
print('foo\u0000f' < 'foo\u0000e');
|
||
|
print('foo\u0000f' < 'foo\u0000f');
|
||
|
print('foo\u0000f' < 'foo\u0000g');
|
||
12 years ago
|
|
||
|
print('' < '');
|
||
|
print('' < '\u0000');
|
||
|
print('\u0000' < '');
|
||
12 years ago
|
} catch (e) {
|
||
|
print(e);
|
||
|
}
|
||
|
|