diff options
author | Jim Meyering <meyering@redhat.com> | 2008-09-07 20:50:49 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-09-07 20:50:49 +0200 |
commit | e4fa3e78088d7bc088d40283edcdd7393d6a5741 (patch) | |
tree | ef9aeab5bf39d64a183af18fc6511fcd24667f4e /tests/misc/printf-surprise | |
parent | 737461d23fd8e48b597d74d2e30cbb9d1b5a2946 (diff) | |
download | coreutils-e4fa3e78088d7bc088d40283edcdd7393d6a5741.tar.xz |
tests: work around Solaris 11 bug
* tests/misc/printf-surprise: Accept bogus prefix on stderr output.
Diffstat (limited to 'tests/misc/printf-surprise')
-rwxr-xr-x | tests/misc/printf-surprise | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise index dd3c332bb..3336f12a5 100755 --- a/tests/misc/printf-surprise +++ b/tests/misc/printf-surprise @@ -61,9 +61,14 @@ exit=$? # Map this longer, and rarer, diagnostic to the common one. # printf: cannot perform formatted output: Cannot allocate memory" \ sed 's/cannot perform .*/write error/' err-msg > k && mv k err-msg -err_msg=$(cat err-msg) +err_msg=$(cat err-msg|tr '\n' :) + +# By some bug, on Solaris 11 (5.11 snv_86), err_msg ends up +# 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 ;; esac |