1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-13 10:52:09 +02:00

tests: fix spurious failure with leading spaces in file names

* tests/ls/stat-vs-dirent.sh: This test lists all parent directories,
and would spuriously fail if any of those had a file name with a
leading space as the first entry.  There is only ever a single space
between the right aligned inode number and the file name, so
process accordingly.
This commit is contained in:
Pádraig Brady
2014-05-13 09:54:29 +01:00
parent 2ccc60a28e
commit 6b3003a9da

View File

@@ -30,7 +30,7 @@ while :; do
d_ino=$(sed -n '1s/^ *\([0-9][0-9]*\) .*/\1/p;q' tmp)
# Extract the name of the corresponding directory entry.
file=$(sed -n '1s/^ *[0-9][0-9]* *//p;q' tmp)
file=$(sed -n '1s/^ *[0-9][0-9]* //p;q' tmp)
# Get its inode number (stat.st_ino) via stat(1)'s call to lstat.
st_ino=$(stat --format=%i "$t/$file")