aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-05-12 11:35:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-05-12 11:35:58 -0700
commitd3e3d803adce646cf169bdb361bb366c0712f598 (patch)
tree9756e033c24957be0f46a3804d7152b746cc7a43 /tests
parentaf721247c243951f544a1843954b3ea958d65c76 (diff)
warn on bad exports, fixes #2338
Diffstat (limited to 'tests')
-rw-r--r--tests/test_other.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index 349a16b4..4a6296e0 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2791,3 +2791,14 @@ int main(int argc, char **argv) {
assert sizes[0] == 7 # no aliasing, all unique, fat tables
assert sizes[1] == 3 # aliased once more
+ def test_bad_export(self):
+ for m in ['', ' ']:
+ self.clear()
+ cmd = [PYTHON, EMCC, path_from_root('tests', 'hello_world.c'), '-s', 'EXPORTED_FUNCTIONS=["' + m + '_main"]']
+ print cmd
+ stdout, stderr = Popen(cmd, stderr=PIPE).communicate()
+ if m:
+ assert 'function requested to be exported, but not implemented: " _main"' in stderr, stderr
+ else:
+ self.assertContained('hello, world!', run_js('a.out.js'))
+