aboutsummaryrefslogtreecommitdiff
path: root/tests/test_other.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-23 15:32:43 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-23 15:32:43 -0700
commit2ebcf95b0e305f777143e3ad783896c17b769324 (patch)
treee0a60a9c313bf4526bec8fe2029d341302caa2f9 /tests/test_other.py
parent8c6578568956816cbb518584cbfa1321587727a7 (diff)
parent3eb16db0edc678ca6183b3d0254b925aee575469 (diff)
Merge branch 'incoming' into proxyGL
Diffstat (limited to 'tests/test_other.py')
-rw-r--r--tests/test_other.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index 14c3f00b..4fb90b1a 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2892,3 +2892,15 @@ int main(int argc, char **argv) {
Popen([PYTHON, EMCC, 'src.cpp']).communicate()
self.assertContained('read: 0\nfile size is 104\n', run_js('a.out.js'))
+ def test_argv0_node(self):
+ open('code.cpp', 'w').write(r'''
+#include <stdio.h>
+int main(int argc, char **argv) {
+ printf("I am %s.\n", argv[0]);
+ return 0;
+}
+''')
+
+ Popen([PYTHON, EMCC, 'code.cpp']).communicate()
+ self.assertContained('I am ' + self.get_dir().replace('\\', '/') + '/a.out.js', run_js('a.out.js', engine=NODE_JS).replace('\\', '/'))
+