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.
This commit is contained in:
Paul Eggert 2023-01-14 17:00:54 -08:00
parent 72ccd15d5c
commit 4b60e9f353
2 changed files with 18 additions and 4 deletions

View File

@ -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

View File

@ -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