]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: printf: add case for quoting single quotes
authorPádraig Brady <P@draigBrady.com>
Fri, 12 Dec 2025 14:15:58 +0000 (14:15 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 12 Dec 2025 14:21:44 +0000 (14:21 +0000)
* tests/printf/printf-quote.sh: Add a test case for
https://bugs.debian.org/992161 which was fixed with
gnulib commit v0.1-7339-g07b31a9465

tests/printf/printf-quote.sh

index 15ff6265ab91e2b2daad7f9af1bf0ac7c39f0c44..bcb7f4994491b6caee87e8e997395e5a5ce6907e 100755 (executable)
@@ -22,7 +22,8 @@ print_ver_ printf
 prog='env printf'
 
 # Equivalent output to ls --quoting=shell-escape
-$prog '%q\n' '' "'" a 'a b' '~a' 'a~' "$($prog %b 'a\r')" > out
+$prog '%q\n' '' "'" a 'a b' '~a' 'a~' \
+ "$($prog %b 'a\r')" "$($prog "\001'\001")" > out
 cat <<\EOF > exp || framework_failure_
 ''
 "'"
@@ -31,6 +32,7 @@ a
 '~a'
 a~
 'a'$'\r'
+''$'\001'\'''$'\001'
 EOF
 compare exp out || fail=1