From 6defc88dbfae0cf5c03e90c8ed8a58ba42cda1f9 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 14 Jul 2012 21:12:40 -0700 Subject: [PATCH] test utf8 in Pointer_stringify --- tests/runner.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/runner.py b/tests/runner.py index c7d1ff282..ebdbd1f6b 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 + #include + + 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')