diff options
Diffstat (limited to 'test/lit/merge/export_options.wat')
-rw-r--r-- | test/lit/merge/export_options.wat | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/lit/merge/export_options.wat b/test/lit/merge/export_options.wat new file mode 100644 index 000000000..26bc9d382 --- /dev/null +++ b/test/lit/merge/export_options.wat @@ -0,0 +1,59 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; If asked to, we rename the conflicts. The second "func" export will become +;; "func_1". +;; RUN: wasm-merge %s first %s.second second --rename-export-conflicts -S -o - | filecheck %s --check-prefix RENAME + +;; If asked to, we can skip conflicting exports from later modules. The second +;; "func" export will not exist. +;; RUN: wasm-merge %s first %s.second second --skip-export-conflicts -S -o - | filecheck %s --check-prefix SKIP_C + +(module + ;; RENAME: (type $none_=>_none (func)) + + ;; RENAME: (export "func" (func $func0)) + + ;; RENAME: (export "func_1" (func $func1)) + + ;; RENAME: (export "other" (func $func2)) + + ;; RENAME: (func $func0 + ;; RENAME-NEXT: (drop + ;; RENAME-NEXT: (i32.const 0) + ;; RENAME-NEXT: ) + ;; RENAME-NEXT: ) + ;; SKIP_C: (type $none_=>_none (func)) + + ;; SKIP_C: (export "func" (func $func0)) + + ;; SKIP_C: (export "other" (func $func2)) + + ;; SKIP_C: (func $func0 + ;; SKIP_C-NEXT: (drop + ;; SKIP_C-NEXT: (i32.const 0) + ;; SKIP_C-NEXT: ) + ;; SKIP_C-NEXT: ) + (func $func0 (export "func") + ;; This export also appears in the second module. + (drop + (i32.const 0) + ) + ) +) +;; RENAME: (func $func1 +;; RENAME-NEXT: (drop +;; RENAME-NEXT: (i32.const 1) +;; RENAME-NEXT: ) +;; RENAME-NEXT: ) + +;; RENAME: (func $func2 +;; RENAME-NEXT: (drop +;; RENAME-NEXT: (i32.const 2) +;; RENAME-NEXT: ) +;; RENAME-NEXT: ) + +;; SKIP_C: (func $func2 +;; SKIP_C-NEXT: (drop +;; SKIP_C-NEXT: (i32.const 2) +;; SKIP_C-NEXT: ) +;; SKIP_C-NEXT: ) |