[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: fix spurious failure with leading spaces in file name
From: |
Jim Meyering |
Subject: |
Re: [PATCH] tests: fix spurious failure with leading spaces in file names |
Date: |
Tue, 13 May 2014 07:33:13 -0700 |
On Tue, May 13, 2014 at 1:59 AM, Pádraig Brady <address@hidden> wrote:
> * 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.
> ---
> tests/ls/stat-vs-dirent.sh | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/ls/stat-vs-dirent.sh b/tests/ls/stat-vs-dirent.sh
> index 6a87621..57c718a 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)
Good catch. Thanks!