Commit 104a9920 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Weaken test case so that it does not depend on the locale

parent 890f8ebc
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
#include <locale.h>
static void test (const char *in, const char *out) static void test (const char *in, const char *out)
{ {
...@@ -102,7 +101,6 @@ static void test_strcasestr (const char *h, const char *n, size_t offset) ...@@ -102,7 +101,6 @@ static void test_strcasestr (const char *h, const char *n, size_t offset)
int main (void) int main (void)
{ {
setlocale (LC_CTYPE, "fr_FR");
(void)setvbuf (stdout, NULL, _IONBF, 0); (void)setvbuf (stdout, NULL, _IONBF, 0);
test ("", ""); test ("", "");
...@@ -128,8 +126,7 @@ int main (void) ...@@ -128,8 +126,7 @@ int main (void)
test_strcasestr ("heLLo", "la", -1); test_strcasestr ("heLLo", "la", -1);
test_strcasestr ("heLLo", "oa", -1); test_strcasestr ("heLLo", "oa", -1);
test_strcasestr ("Télé", "é", 1); test_strcasestr ("Télé", "é", 1);
test_strcasestr ("Télé", "É", 1); test_strcasestr ("Télé", "élé", 1);
test_strcasestr ("Télé", "Élé", 1);
test_strcasestr ("Télé", "léé", -1); test_strcasestr ("Télé", "léé", -1);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment