From: Lasse Collin Date: Sat, 24 May 2025 09:07:13 +0000 (+0300) Subject: tests/test_suffix.sh: Avoid variables in printf format string X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fshellcheck;p=thirdparty%2Fxz.git tests/test_suffix.sh: Avoid variables in printf format string --- diff --git a/tests/test_suffix.sh b/tests/test_suffix.sh index 7fc5996f..1859fe4c 100755 --- a/tests/test_suffix.sh +++ b/tests/test_suffix.sh @@ -118,8 +118,8 @@ else fi # Create two temporary files to be used with --files and --files0. -printf "$SUFFIX_INPUT\n" > "$SUFFIX_INPUT_FILES" -printf "$SUFFIX_INPUT\0" > "$SUFFIX_INPUT_FILES0" +printf '%s\n' "$SUFFIX_INPUT" > "$SUFFIX_INPUT_FILES" +printf '%s\0' "$SUFFIX_INPUT" > "$SUFFIX_INPUT_FILES0" # Test proper handling of --files/--files0 when no suffix is set. This # must result in an error because xz does not know how to rename the output