coreutils
[Top][All Lists]
Advanced

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

[PATCH] tests: fix help-version on cygwin, where $EXEEXT is nonempty


From: Jim Meyering
Subject: [PATCH] tests: fix help-version on cygwin, where $EXEEXT is nonempty
Date: Sun, 26 Feb 2012 10:20:43 +0100

FYI, this changes comes thanks to the fact that the nixos/hydra
autobuilder builds cppi on cygwin, which first highlighted this bug.


>From 72addfcac9c109e3bde5f6a398d39f7a188ce77c Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 19 Feb 2012 18:32:54 +0100
Subject: [PATCH] tests: fix help-version on cygwin, where $EXEEXT is nonempty

* tests/misc/help-version: Remove the $EXEEXT suffix from each
program name before comparing with a literal.
---
 tests/misc/help-version |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/misc/help-version b/tests/misc/help-version
index c89d118..7416062 100755
--- a/tests/misc/help-version
+++ b/tests/misc/help-version
@@ -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
--
1.7.9.2.263.g9be8b7



reply via email to

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