aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-14 11:39:53 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-14 11:39:53 -0800
commitb2c69c52b13e1b3020d33dd915c6e8d13520a722 (patch)
tree1fcef191c59cf5ef75414d9bde140dee665c3485 /tests/runner.py
parent5322f208ad2126038456c90860970739c6e36556 (diff)
emcc linking fixes and tests
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 8154be8b..5a836961 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4961,7 +4961,7 @@ Options that are modified or new in %s include:
self.assertContained('hello, world!', run_js('a.out.js'))
assert test(open('a.out.js').read()), text
- '''# Compiling two source files into a final JS.
+ # Compiling two source files into a final JS.
for args, target in [([], 'a.out.js'), (['-o', 'combined.js'], 'combined.js')]:
clear()
output = Popen([compiler, path_from_root('tests', 'twopart_main.cpp'), path_from_root('tests', 'twopart_side.cpp')] + args,
@@ -4972,7 +4972,7 @@ Options that are modified or new in %s include:
# Compiling two files with -c will generate separate .bc files
clear()
- output = Popen([compiler, path_from_root('tests', 'twopart_main.cpp'), path_from_root('tests', 'twopart_side.cpp'), '-c'],
+ output = Popen([compiler, path_from_root('tests', 'twopart_main.cpp'), path_from_root('tests', 'twopart_side.cpp'), '-c'] + args,
stdout=PIPE, stderr=PIPE).communicate()
if '-o' in args:
# specifying -o and -c is an error
@@ -4987,12 +4987,13 @@ Options that are modified or new in %s include:
output = Popen([compiler, 'twopart_main.bc'] + args, stdout=PIPE, stderr=PIPE).communicate()
assert os.path.exists(target), '\n'.join(output)
#print '\n'.join(output)
- self.assertContained('theFunc is undefined', run_js(target))
+ self.assertContained('is not a function', run_js(target, stderr=STDOUT))
+ try_delete(target)
# Combining those bc files into js should work
output = Popen([compiler, 'twopart_main.bc', 'twopart_side.bc'] + args, stdout=PIPE, stderr=PIPE).communicate()
assert os.path.exists(target), '\n'.join(output)
- self.assertContained('side got: hello from main, over', run_js(target))'''
+ self.assertContained('side got: hello from main, over', run_js(target))
# linking - TODO. in particular, test normal project linking, static and dynamic: get_library should not need to be told what to link!