]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: write-errors.sh: avoid portability issue with dash
authorPádraig Brady <P@draigBrady.com>
Wed, 17 Sep 2025 20:33:47 +0000 (21:33 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 17 Sep 2025 20:37:35 +0000 (21:37 +0100)
* tests/misc/write-errors.sh: Use printf rather than echo
since the echo builtin in dash will interpret backslashes.
* tests/misc/read-errors.sh: Likewise for consistency.

tests/misc/read-errors.sh
tests/misc/write-errors.sh

index f491b905ec451aaadef5809c1d1ae4168d12788c..0a5f7d825c1c494485018a29b73b631e958d82b2 100755 (executable)
@@ -20,7 +20,7 @@
 
 ! cat . >/dev/null 2>&1 || skip_ "Need unreadable directories"
 
-echo "\
+printf '%s' "\
 basenc --base32 .
 basenc -d --base64 .
 cat .
index 34bed5dfc83c21ae853fa2779b6c866f5138721c..b30f4f6bd38aed0a4026123af890a0d0cacd31b9 100755 (executable)
@@ -25,7 +25,7 @@ fi
 
 # Writers that may output data indefinitely
 # First word in command line is checked against built programs
-echo "\
+printf '%s' "\
 cat /dev/zero
 comm -z /dev/zero /dev/zero
 cut -z -c1- /dev/zero