aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/preamble.js3
-rw-r--r--tests/runner.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js
index b5a8930a..35121317 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -557,8 +557,9 @@ function intArrayFromString(stringy, dontAddNull) {
ret.push(stringy.charCodeAt(i));
i = i + 1;
}
- if (!dontAddNull)
+ if (!dontAddNull) {
ret.push(0);
+ }
return ret;
}
Module['intArrayFromString'] = intArrayFromString;
diff --git a/tests/runner.py b/tests/runner.py
index 8a1fd974..59062302 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -2167,7 +2167,7 @@ if 'benchmark' not in sys.argv:
global EXPORTED_FUNCTIONS; EXPORTED_FUNCTIONS = ['_main', '_PyRun_SimpleStringFlags'] # for the demo
self.do_ll_test(path_from_root('tests', 'python', 'python.ll'),
- 'hello python world!\n\n[0, 2, 4, 6]\n\n5\n\n22\n\n5.470',
+ 'hello python world!\n[0, 2, 4, 6]\n5\n22\n5.470',
args=['-S', '-c' '''print "hello python world!"; print [x*2 for x in range(4)]; t=2; print 10-3-t; print (lambda x: x*2)(11); print '%f' % 5.47'''])
### Test cases in separate files