]> Savannah Git Hosting - gnulib.git/commitdiff
mbrtowc tests: Fix regression on glibc.
authorBruno Haible <bruno@clisp.org>
Sun, 25 Feb 2018 00:56:35 +0000 (01:56 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 25 Feb 2018 01:06:28 +0000 (02:06 +0100)
Reported by Bernhard Voelker.

* tests/test-mbrtowc.c (main): Fix expected value of wc.

ChangeLog
tests/test-mbrtowc.c

index 266b41b4bf2173627808a01346f99622d2c154e4..2f2f06ead753cdad3c6da4a5910efef187fbfef3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-02-24  Bruno Haible  <bruno@clisp.org>
+
+       mbrtowc tests: Fix regression on glibc.
+       Reported by Bernhard Voelker.
+       * tests/test-mbrtowc.c (main): Fix expected value of wc.
+
 2018-02-24  Bruno Haible  <bruno@clisp.org>
 
        striconveha, uniconv/*: Avoid test failures on musl libc.
index 54d52f8070e6a4f1f64e39376124b6e7b7ebb8f2..44da2953730fce689fd99ca33b79b2f443a92b8d 100644 (file)
@@ -111,7 +111,7 @@ main (int argc, char *argv[])
                locale.
                On most platforms, the bytes 0x80..0xFF map to U+0080..U+00FF.
                But on musl libc, the bytes 0x80..0xFF map to U+DF80..U+DFFF.  */
-            ASSERT (wc == btowc (c));
+            ASSERT (wc == (btowc (c) == WEOF ? c : btowc (c)));
           ASSERT (mbsinit (&state));
           ret = mbrtowc (NULL, buf, 1, &state);
           ASSERT (ret == 1);