summaryrefslogtreecommitdiff
path: root/test/lit/wasm-split/symbolmap.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/wasm-split/symbolmap.wast')
-rw-r--r--test/lit/wasm-split/symbolmap.wast24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/lit/wasm-split/symbolmap.wast b/test/lit/wasm-split/symbolmap.wast
new file mode 100644
index 000000000..4fe0f5291
--- /dev/null
+++ b/test/lit/wasm-split/symbolmap.wast
@@ -0,0 +1,24 @@
+;; RUN: wasm-split %s --keep-funcs=bar -o1 %t.1.wasm -o2 %t.2.wasm --symbolmap
+;; RUN: filecheck %s --check-prefix PRIMARY-MAP < %t.1.wasm.symbols
+;; RUN: filecheck %s --check-prefix SECONDARY-MAP < %t.2.wasm.symbols
+;; RUN: wasm-dis %t.1.wasm | filecheck %s --check-prefix PRIMARY
+
+;; PRIMARY-MAP: 0:bar
+
+;; SECONDARY-MAP: 0:baz
+;; SECONDARY-MAP: 1:foo
+
+;; Check that the names have been stripped.
+;; PRIMARY: (func $0
+
+(module
+ (func $foo
+ (nop)
+ )
+ (func $bar
+ (nop)
+ )
+ (func $baz
+ (nop)
+ )
+)