]> Savannah Git Hosting - gnulib.git/commitdiff
init.sh: avoid unwarranted test failure when using "set -x"
authorJim Meyering <meyering@redhat.com>
Thu, 22 Dec 2011 11:42:32 +0000 (12:42 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 22 Dec 2011 11:42:32 +0000 (12:42 +0100)
* tests/init.sh (compare): Ignore nonzero exit from compare_dev_null_.
Otherwise, in a test script that uses "set -x" (like many in vc-dwim)
a use like "compare exp out" would get evoke an unconditional failure.

ChangeLog
tests/init.sh

index d52e398eb3d2703d38e9febc3e7584891bc63a83..fe6ff6a64e6185fc678b8a31d930b66f5b6d1bfc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-22  Jim Meyering  <meyering@redhat.com>
+
+       init.sh: avoid unwarranted test failure when using "set -x"
+       * tests/init.sh (compare): Ignore nonzero exit from compare_dev_null_.
+       Otherwise, in a test script that uses "set -x" (like many in vc-dwim)
+       a use like "compare exp out" would get evoke an unconditional failure.
+
 2011-12-21  Alfred M. Szmidt  <ams@gnu.org>
 
        bootstrap: fix it to honor $ACLOCAL_FLAGS once again
index 19c0cf4ae8b2b14779148140413ad25fdfd3d35f..458a44862e81e78db02a15fd0208bfdff87bdd9d 100644 (file)
@@ -304,7 +304,7 @@ fi
 # Otherwise, propagate $? to caller: any diffs have already been printed.
 compare ()
 {
-  compare_dev_null_ "$@"
+  compare_dev_null_ "$@" || :
   case $? in
     0|1) return $?;;
     *) compare_ "$@";;