aboutsummaryrefslogtreecommitdiff
path: root/tests/test_other.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_other.py')
-rw-r--r--tests/test_other.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index f9b0009d..9146888c 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2669,3 +2669,16 @@ int main()
}
''', [3, 1, 1])
+ def test_symbol_map(self):
+ for m in [0, 1]:
+ self.clear()
+ cmd = [PYTHON, EMCC, path_from_root('tests', 'hello_world.c'), '-O2']
+ if m: cmd += ['--emit-symbol-map']
+ print cmd
+ stdout, stderr = Popen(cmd, stderr=PIPE).communicate()
+ assert ('''wrote symbol map file''' in stderr) == m, stderr
+ assert (os.path.exists('a.out.js.symbols') == m), stderr
+ if m:
+ symbols = open('a.out.js.symbols').read()
+ assert ':_main' in symbols
+