diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-20 13:56:22 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-20 13:56:22 -0700 |
commit | 6f2c31d4c86d168967e019bc6e731f6c454de91c (patch) | |
tree | 73f194d034c88cadf2bce70d53062dc68425e9b4 /tests | |
parent | a0c1f8c193e4d5c318f04b886c52bc3e8ab06980 (diff) | |
parent | 7bf034909f6d117320680200d14d0937cabdd787 (diff) |
Merge pull request #1537 from aidanhs/4-byte-utf8-chars
Fix printing of 4 byte UTF-8 characters
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_core.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index f3ddc4f4..29a04e1e 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -7105,14 +7105,15 @@ def process(filename): #include <emscripten.h> int main() { - char *c = "μ†ℱ ╋ℯ╳╋"; + 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("cheez = _malloc(100);" - "Module.writeStringToMemory(\"μ†ℱ ╋ℯ╳╋\", cheez);" - "Module.print([Pointer_stringify(cheez), Module.getValue(cheez, 'i8')&0xff, Module.getValue(cheez+1, 'i8')&0xff, Module.getValue(cheez+2, 'i8')&0xff, Module.getValue(cheez+3, 'i8')&0xff, ]);"); + emscripten_run_script( + "cheez = _malloc(100);" + "Module.writeStringToMemory(\"μ†ℱ ╋ℯ╳╋ 😇\", cheez);" + "Module.print([Pointer_stringify(cheez), Module.getValue(cheez, 'i8')&0xff, Module.getValue(cheez+1, 'i8')&0xff, Module.getValue(cheez+2, 'i8')&0xff, Module.getValue(cheez+3, 'i8')&0xff, ]);"); } ''' - self.do_run(src, '206 188 226 128 μ†ℱ ╋ℯ╳╋\nμ†ℱ ╋ℯ╳╋,206,188,226,128\n'); + self.do_run(src, '206 188 226 128 μ†ℱ ╋ℯ╳╋ 😇\nμ†ℱ ╋ℯ╳╋ 😇,206,188,226,128\n'); def test_direct_string_constant_usage(self): if self.emcc_args is None: return self.skip('requires libcxx') @@ -10141,4 +10142,3 @@ for compiler, quantum, embetter, typed_arrays in [ locals()[fullname] = make_run(fullname, fullname, compiler, embetter, quantum, typed_arrays) del T # T is just a shape for the specific subclasses, we don't test it itself - |