bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: groups --version


From: Jim Meyering
Subject: Re: groups --version
Date: Fri, 31 Aug 2007 17:38:25 +0200

Eric Blake <address@hidden> wrote:
> 2007-08-31  Eric Blake  <address@hidden>
>
>       Test yesterday's change to groups.
>       * tests/misc/groups-version: New test.
>       * tests/misc/Makefile.am (TESTS): Sort, and add new test.

Thanks for the patch.  I'll look at it tonight.

> In writing this, I think tests/sample-test has a bug (although I did not do
> anything about it in my new test, because it would be a global search of all
> existing tests).  You set up t0 based on the contents of "$0", but then
> call 'rm -rf $t0' in the trap; if run in a directory with spaces, you are not
> doing the right thing.  Shouldn't the trap use "$t0" rather than $t0?

Thanks for checking, but...
No.  t0 is defined like this:

  t0=`echo "$0"|sed 's,.*/,,'`.tmp

so what matters is only the final component of $0.
And since coreutils' test script basenames are all well behaved, it's safe.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]