]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: printf-surprise: avoid false-positive failure
authorJim Meyering <meyering@redhat.com>
Thu, 1 Sep 2011 12:45:51 +0000 (14:45 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 1 Sep 2011 14:36:23 +0000 (16:36 +0200)
* tests/misc/printf-surprise: Also accept a strerror-style string
after the usual 'printf: write error:' diagnostic prefix.
Otherwise, this test would fail on HP-UX 11.
Reported by Bruno Haible.

tests/misc/printf-surprise

index ca0f8e4b864993cff2a35f83e964ce2fd93b0206..8c993fdb11f3a41630b0549f88b276642efc94e6 100755 (executable)
@@ -67,7 +67,7 @@ err_msg=$(cat err-msg|tr '\n' :)
 # containing '1> fifo:printf: write error:'.  Recognize that, too.
 
 case $err_msg in
-  "$prog: write error:") diagnostic=y ;;
+  "$prog: write error:"*) diagnostic=y ;;
   "1> fifo:$prog: write error:") diagnostic=y ;;
   '') diagnostic=n ;;
   *) diagnostic=unexpected ;;