summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYury Delendik <ydelendik@mozilla.com>2018-08-31 09:26:23 -0500
committerAlon Zakai <alonzakai@gmail.com>2018-08-31 07:26:23 -0700
commit5c01f256df98dfe94b0c62323f94c1bcdcc3679d (patch)
tree40c799005900da6e886da21c364a1f567c57d296 /test
parente4d014f4293e38f179354af7b049133679b256d8 (diff)
downloadbinaryen-5c01f256df98dfe94b0c62323f94c1bcdcc3679d.tar.gz
binaryen-5c01f256df98dfe94b0c62323f94c1bcdcc3679d.tar.bz2
binaryen-5c01f256df98dfe94b0c62323f94c1bcdcc3679d.zip
Escape name section ids in binary format reading/writing to be WebAssembly spec compatible. (#1646)
Diffstat (limited to 'test')
-rw-r--r--test/complexBinaryNames.wasmbin0 -> 73 bytes
-rw-r--r--test/complexBinaryNames.wasm.fromBinary11
-rw-r--r--test/complexTextNames.wast4
-rw-r--r--test/complexTextNames.wast.from-wast10
-rw-r--r--test/complexTextNames.wast.fromBinary11
-rw-r--r--test/complexTextNames.wast.fromBinary.noDebugInfo11
6 files changed, 47 insertions, 0 deletions
diff --git a/test/complexBinaryNames.wasm b/test/complexBinaryNames.wasm
new file mode 100644
index 000000000..a29653c86
--- /dev/null
+++ b/test/complexBinaryNames.wasm
Binary files differ
diff --git a/test/complexBinaryNames.wasm.fromBinary b/test/complexBinaryNames.wasm.fromBinary
new file mode 100644
index 000000000..e50a9134d
--- /dev/null
+++ b/test/complexBinaryNames.wasm.fromBinary
@@ -0,0 +1,11 @@
+(module
+ (type $0 (func))
+ (export "$zoo (.bar)" (func $1))
+ (func $foo\20\28.bar\29 (; 0 ;) (type $0)
+ (nop)
+ )
+ (func $1 (; 1 ;) (type $0)
+ (call $foo\20\28.bar\29)
+ )
+)
+
diff --git a/test/complexTextNames.wast b/test/complexTextNames.wast
new file mode 100644
index 000000000..f27ca56b3
--- /dev/null
+++ b/test/complexTextNames.wast
@@ -0,0 +1,4 @@
+(module
+ (func $foo\20\28.bar\29)
+ (func "$zoo (.bar)" (call $foo\20\28.bar\29))
+)
diff --git a/test/complexTextNames.wast.from-wast b/test/complexTextNames.wast.from-wast
new file mode 100644
index 000000000..7ea6975f6
--- /dev/null
+++ b/test/complexTextNames.wast.from-wast
@@ -0,0 +1,10 @@
+(module
+ (type $0 (func))
+ (export "$zoo (.bar)" (func $1))
+ (func $foo\20\28.bar\29 (; 0 ;) (type $0)
+ (nop)
+ )
+ (func $1 (; 1 ;) (type $0)
+ (call $foo\20\28.bar\29)
+ )
+)
diff --git a/test/complexTextNames.wast.fromBinary b/test/complexTextNames.wast.fromBinary
new file mode 100644
index 000000000..e50a9134d
--- /dev/null
+++ b/test/complexTextNames.wast.fromBinary
@@ -0,0 +1,11 @@
+(module
+ (type $0 (func))
+ (export "$zoo (.bar)" (func $1))
+ (func $foo\20\28.bar\29 (; 0 ;) (type $0)
+ (nop)
+ )
+ (func $1 (; 1 ;) (type $0)
+ (call $foo\20\28.bar\29)
+ )
+)
+
diff --git a/test/complexTextNames.wast.fromBinary.noDebugInfo b/test/complexTextNames.wast.fromBinary.noDebugInfo
new file mode 100644
index 000000000..ad2a43c34
--- /dev/null
+++ b/test/complexTextNames.wast.fromBinary.noDebugInfo
@@ -0,0 +1,11 @@
+(module
+ (type $0 (func))
+ (export "$zoo (.bar)" (func $1))
+ (func $0 (; 0 ;) (type $0)
+ (nop)
+ )
+ (func $1 (; 1 ;) (type $0)
+ (call $0)
+ )
+)
+