aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 01a4fb61..c7d1ff28 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# This Python file uses the following encoding: utf-8
'''
Simple test runner
@@ -4478,6 +4479,18 @@ def process(filename):
'''
self.do_run(src, re.sub('(^|\n)\s+', '\\1', expected), post_build=add_pre_run_and_checks)
+ def test_utf(self):
+ self.banned_js_engines = [SPIDERMONKEY_ENGINE] # only node handles utf well
+ src = r'''
+ #include <stdio.h>
+
+ int main() {
+ char *c = "μ†ℱ ╋ℯ╳╋";
+ printf("%d %d %d %d %s\n", c[0]&0xff, c[1]&0xff, c[2]&0xff, c[3]&0xff, c);
+ }
+ '''
+ self.do_run(src, '206 188 226 128 μ†ℱ ╋ℯ╳╋\n');
+
def test_direct_string_constant_usage(self):
if self.emcc_args is None: return self.skip('requires libcxx')