diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-07-14 21:12:40 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-07-14 21:12:40 -0700 |
commit | 6defc88dbfae0cf5c03e90c8ed8a58ba42cda1f9 (patch) | |
tree | 76fc64938bec99f3a1d0512b1bac7b868f84caf5 /tests | |
parent | d4a717b757e25cc1ef3adca912320d7a966e922d (diff) |
test utf8 in Pointer_stringify
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index c7d1ff28..ebdbd1f6 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4483,13 +4483,16 @@ def process(filename): self.banned_js_engines = [SPIDERMONKEY_ENGINE] # only node handles utf well src = r''' #include <stdio.h> + #include <emscripten.h> + + char *c = "μ†ℱ ╋ℯ╳╋"; int main() { - char *c = "μ†ℱ ╋ℯ╳╋"; printf("%d %d %d %d %s\n", c[0]&0xff, c[1]&0xff, c[2]&0xff, c[3]&0xff, c); + emscripten_run_script("Module.print(Pointer_stringify(Module.getValue(_c, '*')))"); } ''' - self.do_run(src, '206 188 226 128 μ†ℱ ╋ℯ╳╋\n'); + self.do_run(src, '206 188 226 128 μ†ℱ ╋ℯ╳╋\nμ†ℱ ╋ℯ╳╋\n'); def test_direct_string_constant_usage(self): if self.emcc_args is None: return self.skip('requires libcxx') |