From c969ef4b8fc1d06c13203b36f8cf5bb61a7730f0 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Tue, 22 Aug 2006 01:56:31 +0000 Subject: Merge from trunk. Whoa crap. --- test/string/bug-strcoll1.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/string/bug-strcoll1.c (limited to 'test/string/bug-strcoll1.c') diff --git a/test/string/bug-strcoll1.c b/test/string/bug-strcoll1.c new file mode 100644 index 000000000..b6510d926 --- /dev/null +++ b/test/string/bug-strcoll1.c @@ -0,0 +1,24 @@ +#include +#include +#include + +int +main (void) +{ + const char t1[] = "0-0-0-0-0-0-0-0-0-0.COM"; + const char t2[] = "00000-00000.COM"; + int res1; + int res2; + + setlocale (LC_ALL, "en_US.ISO-8859-1"); + + res1 = strcoll (t1, t2); + printf ("strcoll (\"%s\", \"%s\") = %d\n", t1, t2, res1); + res2 = strcoll (t2, t1); + printf ("strcoll (\"%s\", \"%s\") = %d\n", t2, t1, res2); + + return ((res1 == 0 && res2 != 0) + || (res1 != 0 && res2 == 0) + || (res1 < 0 && res2 < 0) + || (res1 > 0 && res2 > 0)); +} -- cgit v1.2.3