3 "This test checks that BOM is treated as whitespace as required by ES5, but other Cf characters are not, despite \
4 what ECMA-262v3 says, see <https://bugs.webkit.org/show_bug.cgi?id=4931>."
8 // U+FEFF ZERO WIDTH NO-BREAK SPACE (BOM)
9 // U+200F RIGHT-TO-LEFT MARK
10 // U+200E LEFT-TO-RIGHT MARK
12 // U+2062 INVISIBLE TIMES
13 // U+200D ZERO WIDTH JOINER
14 // U+200C ZERO WIDTH NON-JOINER
15 // U+200B ZERO WIDTH SPACE
16 var testString
= "";
17 shouldBe('escape(testString)',"'%uFEFF%u200F%u200E%AD%u2062%u200D%u200C%u200B'");
19 var testString2
= eval('"\uFEFF\u200F\u200E\u00AD\u2062\u200D\u200C\u200B"');
20 shouldBe('escape(testString2)',"'%uFEFF%u200F%u200E%AD%u2062%u200D%u200C%u200B'");
22 // A BOM is inside "shouldBe".
24 shouldBe('eval(\'"\uFEFF"\').length', '1');
25 shouldBe('eval(\'"\uFEFF"\').charCodeAt(0)', '0xFEFF');
26 shouldBe('+'+eval("\"\uFEFF\"")+'+1 /* BOM between the +\'s */', '1');