tests: avoid triggering obsolete tail option processing

* 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.
This commit is contained in:
Pádraig Brady 2024-03-25 13:01:33 +00:00
parent ecb2fecdf9
commit a51af43294

View File

@ -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"