diff options
author | Thomas Lively <tlively@google.com> | 2022-10-11 14:05:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 12:05:16 -0700 |
commit | ebe30fd682535e43e54d4a76f3ff5f09a6340d3a (patch) | |
tree | a6ab04e97bf7e9b593979ed573dea5be20247b44 /test | |
parent | b83450ed1fd98cec4453024f57f892b31851ea50 (diff) | |
download | binaryen-ebe30fd682535e43e54d4a76f3ff5f09a6340d3a.tar.gz binaryen-ebe30fd682535e43e54d4a76f3ff5f09a6340d3a.tar.bz2 binaryen-ebe30fd682535e43e54d4a76f3ff5f09a6340d3a.zip |
Support null characters in string.const expressions (#5123)
Remove an obsolete error about null characters and test both binary and text
round tripping of a string constant containing an escaped zero byte.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/strings.wast | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/lit/strings.wast b/test/lit/strings.wast index c950e914b..6b55f2863 100644 --- a/test/lit/strings.wast +++ b/test/lit/strings.wast @@ -5,7 +5,11 @@ ;; runs --precompute in order to verify no problems occur in the optimizer's ;; invocation of the interpreter. -;; RUN: foreach %s %t wasm-opt --enable-strings --enable-reference-types --enable-gc --roundtrip --precompute -S -o - | filecheck %s +;; RUN: wasm-opt %s --enable-strings --enable-reference-types --enable-gc --roundtrip --precompute -S -o - | filecheck %s + +;; Check that we can roundtrip through the text format as well. + +;; RUN: wasm-opt %s -all -S -o - | wasm-opt -all --precompute -S -o - | filecheck %s (module (memory 10 10) @@ -31,8 +35,8 @@ ;; CHECK: (type $stringref_ref|$array|_ref|$array16|_=>_none (func (param stringref (ref $array) (ref $array16)))) - ;; CHECK: (global $string-const stringref (string.const "string in a global \01\ff\t\t\n\n\r\r\"\"\'\'\\\\")) - (global $string-const stringref (string.const "string in a global \01\ff\t\09\n\0a\r\0d\"\22\'\27\\\5c")) + ;; CHECK: (global $string-const stringref (string.const "string in a global \01\ff\00\t\t\n\n\r\r\"\"\'\'\\\\")) + (global $string-const stringref (string.const "string in a global \01\ff\00\t\09\n\0a\r\0d\"\22\'\27\\\5c")) ;; CHECK: (memory $0 10 10) |