projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
629dbf8
)
setlocale C.UTF-8 in regex test that depends on UTF-8
author
Szabolcs Nagy
<nsz@port70.net>
Sat, 13 Jun 2015 20:50:53 +0000
(20:50 +0000)
committer
Szabolcs Nagy
<nsz@port70.net>
Sat, 13 Jun 2015 20:50:53 +0000
(20:50 +0000)
src/regression/regex-escaped-high-byte.c
patch
|
blob
|
history
diff --git
a/src/regression/regex-escaped-high-byte.c
b/src/regression/regex-escaped-high-byte.c
index
7a29489
..
70a8d44
100644
(file)
--- a/
src/regression/regex-escaped-high-byte.c
+++ b/
src/regression/regex-escaped-high-byte.c
@@
-1,5
+1,6
@@
// commit 39dfd58417ef642307d90306e1c7e50aaec5a35c 2015-03-20
// backslash followed by high byte should be parsed as a normal sequence
+#include <locale.h>
#include <regex.h>
#include "test.h"
@@
-9,6
+10,8
@@
int main(void)
regex_t r;
int n;
+ setlocale(LC_CTYPE, "C.UTF-8");
+
// illegal sequence (not U+00FC)
n = regcomp(&r, "\\\xfc", 0);
if (n != REG_BADPAT) {