From ab565f1a3ca2d9a320c958786fb3a9df3392ceae Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Mon, 20 Sep 2021 22:37:22 -0700 Subject: Fix parsing/printing unicode identifiers, switch to UTF-8 for prefilled strings, remove eagerly loading identifier_name --- integration/snippets/string-escapes.js | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 integration/snippets/string-escapes.js (limited to 'integration/snippets/string-escapes.js') diff --git a/integration/snippets/string-escapes.js b/integration/snippets/string-escapes.js new file mode 100644 index 000000000..dc5c7cff9 --- /dev/null +++ b/integration/snippets/string-escapes.js @@ -0,0 +1,35 @@ +var tab = "\t"; +var シ = "wow"; +var f = ""; +var obj = { + "\r\n": "\r\n", + "\n": "\n", + "\t": "\t", + "\u2028": "\u2028", + "\u2029": "\u2029", + "😊": "😊", + "😃": "😃", + "㋡": "㋡", + "☺": "☺", + シ: "シ", + f: f, + "☹": "☹", + "☻": "☻", + children: 123, +}; +const foo = () => {}; +const Bar = foo("a", { + children: 123, +}); + +const carriage = obj["\r\n"]; +const newline = obj["\n"]; + +export { obj }; + +export function test() { + console.assert(carriage === "\r\n"); + console.assert(newline === "\n"); + console.assert(tab === "\t"); + return testDone(import.meta.url); +} -- cgit v1.2.3