On Saturday 15 January 2011, Ralf Wildenhues wrote: > Like this? > > Thanks, > Ralf > > 2011-01-15 Ralf Wildenhues <ralf.wildenh...@gmx.de> > Stefano Lattarini <stefano.lattar...@gmail.com> > > tests: explain MSYS setup failure issue, improve test. > * tests/defs: Add comment and failure message, improve fail > logic. > > diff --git a/tests/defs b/tests/defs > index 0f84d0a..b357df6 100644 > --- a/tests/defs > +++ b/tests/defs > @@ -31,8 +31,10 @@ test -f ./defs-static || { > . ./defs-static || exit 99 > > # The name of the current test (without the `.test' suffix.) > -me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` > -test -n "$me" || exit 99 > +# Guard against failure to spawn sed (seen on MSYS), or empty $argv0. > +me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` \ > + && test -n "$me" \ > + || { echo "$argv0: failed to define \$me" >&2; exit 99; } > > Yes (good comment BTW, terse but clear).
Thanks, Stefano