|
16 | 16 | (drop
|
17 | 17 | (string.const "needs\tescaping\00.'#%\"- .\r\n\\08\0C\0A\0D\09.ꙮ")
|
18 | 18 | )
|
| 19 | + (drop |
| 20 | + ;; GOTHIC LETTER HWAIR: 𐍈 has code point 0x10348 and is \uD800 \uDF48 in UTF-16. |
| 21 | + (string.const "surrogate pair \F0\90\8D\88 ") |
| 22 | + ) |
19 | 23 | (drop
|
20 | 24 | (string.const "unpaired high surrogate \ED\A0\80 ")
|
21 | 25 | )
|
|
40 | 44 | ;; RUN: not wasm-opt %s --string-lowering-magic-imports-assert -all -S -o - \
|
41 | 45 | ;; RUN: 2>&1 | filecheck %s --check-prefix=ASSERT
|
42 | 46 | ;;
|
43 |
| -;; CHECK: custom section "string.consts", size 136, contents: "[\"bar\",\"foo\",\"needs\\tescaping\\u0000.'#%\\\"- .\\r\\n\\\\08\\f\\n\\r\\t.\\ua66e\",\"unpaired high surrogate \\ud800 \",\"unpaired low surrogate \\udf48 \"]" |
| 47 | +;; CHECK: custom section "string.consts", size 167, contents: "[\"bar\",\"foo\",\"needs\\tescaping\\u0000.'#%\\\"- .\\r\\n\\\\08\\f\\n\\r\\t.\\ua66e\",\"surrogate pair \\ud800\\udf48 \",\"unpaired high surrogate \\ud800 \",\"unpaired low surrogate \\udf48 \"]" |
44 | 48 | ;;
|
45 | 49 | ;; MAGIC: custom section "string.consts", size 68, contents: "[\"unpaired high surrogate \\ud800 \",\"unpaired low surrogate \\udf48 \"]"
|
46 | 50 | ;;
|
|
53 | 57 | ;; RUN: wasm-opt %s --string-lowering --remove-unused-module-elements -all -o %t.wasm
|
54 | 58 | ;; RUN: node %S/string-lowering.js %t.wasm | filecheck %s --check-prefix=CHECK-JS
|
55 | 59 | ;;
|
56 |
| -;; CHECK-JS: string: ["bar","foo","needs\tescaping\x00.'#%\"- .\r\n\\08\f\n\r\t.\ua66e","unpaired high surrogate \ud800 ","unpaired low surrogate \udf48 "] |
| 60 | +;; CHECK-JS: string: ["bar","foo","needs\tescaping\x00.'#%\"- .\r\n\\08\f\n\r\t.\ua66e","surrogate pair \ud800\udf48 ","unpaired high surrogate \ud800 ","unpaired low surrogate \udf48 "] |
57 | 61 | ;;
|
58 |
| -;; CHECK-JS: JSON: ["bar","foo","needs\tescaping\x00.'#%\"- .\r\n\\08\f\n\r\t.ꙮ","unpaired high surrogate \ud800 ","unpaired low surrogate \udf48 "] |
| 62 | +;; CHECK-JS: JSON: ["bar","foo","needs\tescaping\x00.'#%\"- .\r\n\\08\f\n\r\t.ꙮ","surrogate pair 𐍈 ","unpaired high surrogate \ud800 ","unpaired low surrogate \udf48 "] |
0 commit comments