]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid triggering obsolete tail option processing
authorPádraig Brady <P@draigBrady.com>
Mon, 25 Mar 2024 13:01:33 +0000 (13:01 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 25 Mar 2024 13:02:52 +0000 (13:02 +0000)
* tests/ls/dired.sh: With 2 options, the latter is taken
as a file name on some systems.  This avoids a false
failure on Solaris and FreeBSD at least.

tests/ls/dired.sh

index 98bb168d94ea26feca8fd6977eeb1ce81668d582..7c6c03bd468bce9c5946ef3b833f91ff78f42758 100755 (executable)
@@ -58,7 +58,7 @@ fi
 index=1
 set -- $dired_values
 while test "$#" -gt 0; do
-  extracted_filename=$(head -c "$2" out | tail -c +"$(($1 + 1))")
+  extracted_filename=$(head -c "$2" out | tail -c+"$(($1 + 1))")
   expected_file=$(echo $expected_files | cut -d' ' -f$index)
   if test "$extracted_filename" != "$expected_file"; then
     echo "Mismatch! Expected: $expected_file, Found: $extracted_filename"