History

Add test case for wide char handling in wide string literal

Zhang Boyang committed 9 years ago

Commit 978d1ec1 parent b39810f2 files · +13 −0Browse files

Unified · Split

2 files
  1. tests/tests2/97_utf8_string_literal.c +12 −0
  2. tests/tests2/97_utf8_string_literal.expect +1 −0
tests/tests2/97_utf8_string_literal.c+12−0
@@ -0,0 +1,12 @@
1+// this file contains BMP chars encoded in UTF-8
2+#include <stdio.h>
3+#include <wchar.h>
4+
5+int main()
6+{
7+ wchar_t s[] = L"hello$$你好¢¢世界€€world";
8+ wchar_t *p;
9+ for (p = s; *p; p++) printf("%04X ", (unsigned) *p);
10+ printf("\n");
11+ return 0;
12+}
tests/tests2/97_utf8_string_literal.expect+1−0
@@ -0,0 +1 @@
1+0068 0065 006C 006C 006F 0024 0024 4F60 597D 00A2 00A2 4E16 754C 20AC 20AC 0077 006F 0072 006C 0064

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t