diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2023-01-14 17:00:54 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2023-01-15 16:38:56 -0800 |
commit | 4b60e9f353517e2034cc77f16b97580a5982b9c6 (patch) | |
tree | 3df5f0c92e5dc195def69796c6804a6c94ee94d8 /tests | |
parent | 72ccd15d5c73c687dc7eef81f3dbea2f33134cc4 (diff) | |
download | grep-4b60e9f353517e2034cc77f16b97580a5982b9c6.tar.gz |
tests: port U+10000+ to AIX 7.2
* tests/hangul-syllable, tests/surrogate-search:
32-bit AIX has WCHAR_MAX == 0xFFFF, and so cannot handle
U+10000 and greater. Skip tests involving such chars
on this platform.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/hangul-syllable | 9 | ||||
-rwxr-xr-x | tests/surrogate-search | 13 |
2 files changed, 18 insertions, 4 deletions
diff --git a/tests/hangul-syllable b/tests/hangul-syllable index 961875de..481279a2 100755 --- a/tests/hangul-syllable +++ b/tests/hangul-syllable @@ -99,6 +99,15 @@ for i in 355; do done done done + +# On platforms like 32-bit AIX where WCHAR_MAX == 0xFFFF, skip checks +# where the corresponding Unicode characters are not supported. +if test $fail -eq 0; then + printf '\360\220\200\200\n' >in || framework_failure_ + grep '^.$' in >out 2>&1 || fail=1 + cmp in out || skip_ 'platform does not support U+10000' +fi + for i in 360; do for j in 220 277; do for k in 200 277; do diff --git a/tests/surrogate-search b/tests/surrogate-search index 65d02857..7dfea54a 100755 --- a/tests/surrogate-search +++ b/tests/surrogate-search @@ -28,15 +28,20 @@ esac fail=0 -s_pair=$(printf '\360\220\220\205') -printf '%s\n' "$s_pair" > in || framework_failure_ - LC_ALL=en_US.UTF-8 export LC_ALL +# On platforms like 32-bit AIX where WCHAR_MAX == 0xFFFF, skip this check, +# since the corresponding Unicode characters are not supported. +printf '\360\220\200\200\n' >in || framework_failure_ +grep '^.$' in >out || fail=1 +compare in out || skip_ 'platform does not support U+10000' + +printf '\360\220\220\205\n' > in || framework_failure_ + for opt in '' -i -E -F -iE -iF; do grep --file=in $opt in > out 2>&1 || fail=1 - compare out in || fail=1 + compare in out || fail=1 done Exit $fail |