diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-07-14 19:01:09 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-07-14 19:01:09 -0700 |
commit | 4ffb769331329f8997d3597854cabe4e109e8684 (patch) | |
tree | 12ceefb66430ba98eeda93eaa77d721c1de11dd7 /tests/runner.py | |
parent | 19e90e544bf933609094389536cfb123313bf9df (diff) |
utf-8 support
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 13 |
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') |