incomplete_hex_unicode_escape.js (558B)
1 // Copyright (C) 2015 Zirak. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: An incomplete HexEscape or UnicodeEscape should be treated as an Identity Escape 6 info: | 7 An incomplete HexEscape (e.g. /\x/) or UnicodeEscape (/\u/) should fall 8 through to IdentityEscape 9 esid: prod-AtomEscape 10 ---*/ 11 12 // Hex escape 13 assert(/\x/.test("x"), "/\\x/"); 14 assert(/\xa/.test("xa"), "/\\xa/"); 15 16 // Unicode escape 17 assert(/\u/.test("u"), "/\\u/"); 18 assert(/\ua/.test("ua"), "/\\ua/"); 19 20 reportCompare(0, 0);