* init.cfg: Use 0xFF rather than 0xC3 everywhere. * tests/fold/fold-characters.sh: Reuse bad_unicode(). * tests/tac/tac-locale.sh: Likewise. --- init.cfg | 2 +- tests/fold/fold-characters.sh | 7 +------ tests/tac/tac-locale.sh | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/init.cfg b/init.cfg index ae02adcfd..0896d8dda 100644 --- a/init.cfg +++ b/init.cfg @@ -837,7 +837,7 @@ bad_unicode () require_built_ printf # invalid UTF8|unpaired surrogate|C1 control|noncharacter - env printf '\xC3|\xED\xBA\xAD|\u0089|\xED\xA6\xBF\xED\xBF\xBF\n' + env printf '\xFF|\xED\xBA\xAD|\u0089|\xED\xA6\xBF\xED\xBF\xBF\n' } # AIX has a 'strace' program unrelated to the one we care about. Avoid diff --git a/tests/fold/fold-characters.sh b/tests/fold/fold-characters.sh index 5af9856f6..6edaa9c05 100755 --- a/tests/fold/fold-characters.sh +++ b/tests/fold/fold-characters.sh @@ -83,12 +83,7 @@ env printf '\naaaa\n' >> exp3 || framework_failure_ fold --characters input3 | tail -n 4 > out3 || fail=1 compare exp3 out3 || fail=1 -# Sequence derived from <https://datatracker.ietf.org/doc/rfc9839>. -bad_unicode_with_nul () -{ - # invalid UTF8|unpaired surrogate|NUL|C1 control|noncharacter - env printf '\xFF|\xED\xBA\xAD|\u0000|\u0089|\xED\xA6\xBF\xED\xBF\xBF\n' -} +bad_unicode_with_nul () { env printf '%s|\u0000\n' "$(bad_unicode)"; } bad_unicode_with_nul > exp4 || framework_failure_ bad_unicode_with_nul | fold > out4 || fail=1 compare exp4 out4 || fail=1 diff --git a/tests/tac/tac-locale.sh b/tests/tac/tac-locale.sh index 9a96a66b8..70833db11 100755 --- a/tests/tac/tac-locale.sh +++ b/tests/tac/tac-locale.sh @@ -38,8 +38,7 @@ export LC_ALL=$LOCALE_FR_UTF8 if test "$(locale charmap 2>/dev/null)" = UTF-8; then check_separator '\u0434' # д check_separator '\u0434\u0436' # дж - # invalid UTF8|unpaired surrogate|C1 control|noncharacter - check_separator '\xC3|\xED\xBA\xAD|\u0089|\xED\xA6\xBF\xED\xBF\xBF' + check_separator "$(bad_unicode)" fi Exit $fail -- 2.53.0
