]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
test defs: fix glitch in TAP version of `warn_' function
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 7 Sep 2011 14:35:17 +0000 (16:35 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 7 Sep 2011 14:35:17 +0000 (16:35 +0200)
* tests/tap-functions.sh (warn_): Do not display the warning
message two times.

ChangeLog
tests/tap-functions.sh

index 79879cac2ecd2226e382d750744e4096de0b5311..9759787c0d9c22d01b862cc82097a694c191c210 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test defs: fix glitch in TAP version of `warn_' function
+       * tests/tap-functions.sh (warn_): Do not display the warning
+       message two times.
+
 2011-09-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: fix another spurious failure due to ignored signals
index ea88887aefa8e5a48dcecb1301df423f35b2ecf0..eb27ba6059577a65a1a1f738ac48e96aa4aea43f 100644 (file)
@@ -97,7 +97,10 @@ diag_string_="#"
 # Give a warning (using TAP diagnostic).
 warn_ ()
 {
-  diag_ "WARNING:" ${1-"(unknown warning)"} ${1+"$@"}
+  case $# in
+    0) diag_ "WARNING: (unknown warning)";;
+    *) diag_ "WARNING: $*";;
+  esac
 }
 
 # result_ RESULT [-D DIRECTIVE] [-r REASON] [--] [DESCRIPTION...]