* tests/test-mbrtowc.c: Add comment.
* tests/test-mbrtowc5.sh: Use symmetric coding style.
* doc/posix-functions/mbrtowc.texi: Update.
+2023-03-30 Bruno Haible <bruno@clisp.org>
+
+ mbrtowc tests: Add comment.
+ * tests/test-mbrtowc.c: Add comment.
+ * tests/test-mbrtowc5.sh: Use symmetric coding style.
+ * doc/posix-functions/mbrtowc.texi: Update.
+
2023-03-30 Bruno Haible <bruno@clisp.org>
stdlib tests: Check behaviour of C locale.
@item
In the C or POSIX locales, this function can return @code{(size_t) -1}
and set @code{errno} to @code{EILSEQ}:
-glibc 2.23.
+glibc 2.35.
@item
This function returns 0 instead of @code{(size_t) -2} when the input
is empty:
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, buf, 1, &state);
+ /* POSIX:2018 says: "In the POSIX locale an [EILSEQ] error
+ cannot occur since all byte values are valid characters." */
ASSERT (ret == 1);
if (c < 0x80)
/* c is an ASCII character. */
#!/bin/sh
+
# Test whether the POSIX locale has encoding errors.
LC_ALL=C \
-${CHECKER} ./test-mbrtowc${EXEEXT} 5 || exit
+${CHECKER} ./test-mbrtowc${EXEEXT} 5 || exit 1
LC_ALL=POSIX \
-${CHECKER} ./test-mbrtowc${EXEEXT} 5
+${CHECKER} ./test-mbrtowc${EXEEXT} 5 || exit 1
+
+exit 0