2 "Test non-escaping characters in string literals - added with https://bugs.webkit.org/show_bug.cgi?id=100580"
5 function test(character
)
7 shouldBeEqualToString('eval(\'"\\' + character
+ '"\')', character
);
10 charactersToTest
= " !#$%&\'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`acdeghijklmopqswyz{|}~";
12 for (i
= 0; i
< charactersToTest
.length
; i
++)
13 test(charactersToTest
.charAt(i
));
15 function testOther(character
)
17 shouldEvaluateTo('eval(\'"\\' + character
+ '"\').charCodeAt(0)', character
.charCodeAt(0));
20 // Test some characters outside the printable ASCII range
21 otherCharactersToTest
= "\x01\x07\x08\x1f\xa0\xa3\xab\xb4";
23 for (i
= 0; i
< otherCharactersToTest
.length
; i
++)
24 testOther(otherCharactersToTest
.charAt(i
));