mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
Add test case for wide char handling in wide string literal
This commit is contained in:
parent
b39810ff78
commit
978d1ecce0
12
tests/tests2/97_utf8_string_literal.c
Normal file
12
tests/tests2/97_utf8_string_literal.c
Normal file
@ -0,0 +1,12 @@
|
||||
// this file contains BMP chars encoded in UTF-8
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
wchar_t s[] = L"hello$$你好¢¢世界€€world";
|
||||
wchar_t *p;
|
||||
for (p = s; *p; p++) printf("%04X ", (unsigned) *p);
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
1
tests/tests2/97_utf8_string_literal.expect
Normal file
1
tests/tests2/97_utf8_string_literal.expect
Normal file
@ -0,0 +1 @@
|
||||
0068 0065 006C 006C 006F 0024 0024 4F60 597D 00A2 00A2 4E16 754C 20AC 20AC 0077 006F 0072 006C 0064
|
Loading…
Reference in New Issue
Block a user