tests: work around Solaris 11 bug

* tests/misc/printf-surprise: Accept bogus prefix on stderr output.
This commit is contained in:
Jim Meyering 2008-09-07 20:50:49 +02:00
parent 737461d23f
commit e4fa3e7808

View File

@ -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