mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: printf: ensure %q quotes C1 controls in names with apostrophes
Reported at https://github.com/uutils/coreutils/issues/15810 * tests/printf/printf-quote.sh: Add a test case. Link: https://github.com/coreutils/coreutils/pull/445
This commit is contained in:
1 parent
d7e639418a
commit
0201866781
1 file changed
+3
@@ -44,12 +44,15 @@ if test -n "$LOCALE_FR_UTF8" && test "$LOCALE_FR_UTF8" != "none"; then
|
||||
LC_ALL=$f $prog '%q\n' 'áḃç' > out
|
||||
#non-printable multi-byte
|
||||
LC_ALL=$f $prog '%q\n' "$($prog '\xc2\x81')" >> out
|
||||
#non-printable multi-byte in a name with an apostrophe
|
||||
LC_ALL=$f $prog '%q\n' "$($prog "it's\\xc2\\x9bhere")" >> out
|
||||
#printable multi-byte in C locale
|
||||
LC_ALL=C $prog '%q\n' 'áḃç' >> out
|
||||
)
|
||||
cat <<\EOF > exp || framework_failure_
|
||||
áḃç
|
||||
''$'\302\201'
|
||||
'it'\''s'$'\302\233''here'
|
||||
''$'\303\241\341\270\203\303\247'
|
||||
EOF
|
||||
compare exp out || fail=1
|
||||
|
||||
Reference in new issue
Block a user