]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: fix help-version on cygwin, where $EXEEXT is nonempty
authorJim Meyering <meyering@redhat.com>
Sun, 19 Feb 2012 17:32:54 +0000 (18:32 +0100)
committerJim Meyering <meyering@redhat.com>
Sun, 26 Feb 2012 08:48:48 +0000 (09:48 +0100)
* tests/misc/help-version: Remove the $EXEEXT suffix from each
program name before comparing with a literal.

tests/misc/help-version

index c89d11856983b7ecc978de6cfe4ab371160223fb..7416062fa7201c55cc1d224291a85746a8f572e2 100755 (executable)
@@ -100,7 +100,7 @@ for lang in C fr da; do
       env $i --help    >/dev/full 2>/dev/null && fail=1
       env $i --version >/dev/full 2>/dev/null && fail=1
       status=$?
-      test $i = [ && prog=lbracket || prog=$i
+      test $i = [ && prog=lbracket || prog=$(echo $i|sed "s/$EXEEXT$//")
       eval "expected=\$expected_failure_status_$prog"
       test x$expected = x && expected=1
       if test $status = $expected; then
@@ -265,7 +265,7 @@ for i in $built_programs; do
   cp $tmp_in $tmp_in2
   mkdir $tmp_dir
   # echo ================== $i
-  test $i = [ && prog=lbracket || prog=$i
+  test $i = [ && prog=lbracket || prog=$(echo $i|sed "s/$EXEEXT$//")
   if type ${prog}_setup > /dev/null 2>&1; then
     ${prog}_setup
   else