]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: tac: test --separator with invalid UTF-8
authorCollin Funk <collin.funk1@gmail.com>
Sat, 29 Nov 2025 05:28:21 +0000 (21:28 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Sat, 29 Nov 2025 05:46:40 +0000 (21:46 -0800)
* tests/tac/tac-locale.sh: Test that a string containing invalid UTF-8
characters can be used for --separator.

tests/tac/tac-locale.sh

index 2bb6e404c2d1aff7337bf21467d42b773edd4656..f6383c2daaffaff3a6c8514e11e4e37320c83c92 100755 (executable)
@@ -38,6 +38,8 @@ 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'
 fi
 
 Exit $fail