summaryrefslogtreecommitdiff
path: root/test/unit/test_finalize.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_finalize.py')
-rw-r--r--test/unit/test_finalize.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/test_finalize.py b/test/unit/test_finalize.py
new file mode 100644
index 000000000..cdcfe27e8
--- /dev/null
+++ b/test/unit/test_finalize.py
@@ -0,0 +1,14 @@
+from scripts.test.shared import WASM_EMSCRIPTEN_FINALIZE, run_process
+from .utils import BinaryenTestCase
+import os
+
+
+class EmscriptenFinalizeTest(BinaryenTestCase):
+ def test_em_asm_mangled_string(self):
+ input_dir = os.path.dirname(__file__)
+ p = run_process(WASM_EMSCRIPTEN_FINALIZE + [
+ os.path.join(input_dir, 'input', 'em_asm_mangled_string.wast'), '-o', os.devnull, '--global-base=1024'
+ ], check=False, capture_output=True)
+ self.assertNotEqual(p.returncode, 0)
+ self.assertIn('Fatal: local.get of unknown in arg0 of call to $emscripten_asm_const_int (used by EM_ASM* macros) in function $main.', p.stderr)
+ self.assertIn('This might be caused by aggressive compiler transformations. Consider using EM_JS instead.', p.stderr)