From b037ed51f0e25671da47611ca27a4f45f0c9ada9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 12 Dec 2019 13:02:28 +0100 Subject: wcwidth: Avoid test failure on AIX 7.2. * tests/test-wcwidth.c (main): Don't fail if wcwidth(0x200B) is negative. * doc/posix-functions/wcwidth.texi: Mention the AIX issue. --- tests/test-wcwidth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test-wcwidth.c') diff --git a/tests/test-wcwidth.c b/tests/test-wcwidth.c index 8e9cea3e49..ecb50cd00f 100644 --- a/tests/test-wcwidth.c +++ b/tests/test-wcwidth.c @@ -69,7 +69,11 @@ main () #endif /* Test width of some zero width characters. */ - ASSERT (wcwidth (0x200B) == 0); + /* While it is desirable that U+200B, U+200C, U+200D have width 0, + because this makes wcswidth work better on strings that contain these + characters, it is acceptable if an implementation treats these + characters like control characters. */ + ASSERT (wcwidth (0x200B) <= 0); ASSERT (wcwidth (0xFEFF) <= 0); /* Test width of some math symbols. -- cgit v1.2.1