summaryrefslogtreecommitdiff
path: root/tests/ls/stat-vs-dirent.sh
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-05-13 09:54:29 +0100
committerPádraig Brady <P@draigBrady.com>2014-05-13 09:58:33 +0100
commit6b3003a9da29c17324dd3ce395861b07fd7fa27d (patch)
tree953eea9f0eecca8af3e49be4c3912260559e0bd8 /tests/ls/stat-vs-dirent.sh
parent2ccc60a28e147d960f016fc38060f0d393ab8791 (diff)
downloadcoreutils-6b3003a9da29c17324dd3ce395861b07fd7fa27d.tar.xz
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.
Diffstat (limited to 'tests/ls/stat-vs-dirent.sh')
-rwxr-xr-xtests/ls/stat-vs-dirent.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ls/stat-vs-dirent.sh b/tests/ls/stat-vs-dirent.sh
index 6a87621ef..57c718a98 100755
--- a/tests/ls/stat-vs-dirent.sh
+++ b/tests/ls/stat-vs-dirent.sh
@@ -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")