diff --git a/ChangeLog b/ChangeLog index bfc1333..aa152ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-16 Ben Elliston + + * testsuite/config-guess.sh: Simplify some shell logic. + * testsuite/config-sub.sh: Likewise. + 2009-12-13 Alfred M. Szmidt * config.sub (version): Add the year 2009. diff --git a/testsuite/config-guess.sh b/testsuite/config-guess.sh index 324f275..85a8056 100644 --- a/testsuite/config-guess.sh +++ b/testsuite/config-guess.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2004, 2005 Free Software Foundation, Inc. +# Copyright 2004, 2005, 2009 Free Software Foundation, Inc. # Contributed by Ben Elliston . # # This test reads 5-tuples from config-guess.data: the components of @@ -8,7 +8,6 @@ verbose=false export PATH=`pwd`:$PATH -IFS=" " # tab run_config_guess () { @@ -36,12 +35,11 @@ run_config_guess () return $rc } -sed 's/ */ /g' < config-guess.data | run_config_guess -rc=$? -if test $rc -eq 0 ; then +if run_config_guess < config-guess.data ; then $verbose || echo "PASS: config.guess checks" else - test $rc -eq 1 && echo "Unexpected failures." + echo "Unexpected failures." + exit 1 fi -exit $rc +exit 0 diff --git a/testsuite/config-sub.sh b/testsuite/config-sub.sh index ab5d7ff..ca56136 100644 --- a/testsuite/config-sub.sh +++ b/testsuite/config-sub.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2004, 2005 Free Software Foundation, Inc. +# Copyright 2004, 2005, 2009 Free Software Foundation, Inc. # Contributed by Ben Elliston . # # This test reads pairs from config-sub.data: an alias and its @@ -24,12 +24,11 @@ run_config_sub () return $rc } -run_config_sub -rc=$? -if test $rc -eq 0 ; then +if run_config_sub ; then $verbose || echo "PASS: config.sub checks" else - test $rc -eq 1 && echo "Unexpected failures." + echo "Unexpected failures." + exit 1 fi -exit $rc +exit 0