diff options
author | Bruno Haible <bruno@clisp.org> | 2019-12-12 13:02:28 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-12-12 13:02:28 +0100 |
commit | b037ed51f0e25671da47611ca27a4f45f0c9ada9 (patch) | |
tree | 5524e78574318dc5c8287892816c0c0e17c11aed /tests/test-wcwidth.c | |
parent | e5bad6d5201e3e1ad4eb5af82825447591b0fae4 (diff) | |
download | gnulib-b037ed51f0e25671da47611ca27a4f45f0c9ada9.tar.gz |
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.
Diffstat (limited to 'tests/test-wcwidth.c')
-rw-r--r-- | tests/test-wcwidth.c | 6 |
1 files changed, 5 insertions, 1 deletions
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. |