From: Ben Pfaff Date: Tue, 2 Nov 2010 13:39:05 +0000 (-0700) Subject: Improve failure output of tests that use wc. X-Git-Tag: v0.7.7~150 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04c3ce58d4e2d15477d36654c3f7f3269c9a7a03;p=pspp-builds.git Improve failure output of tests that use wc. Commit 37c5ded73 "Make tests which use wc more robust." made these tests tolerate slightly different output formats, but at the same time, if the tests fail we don't find out why. This commit should retain the fix but also provide more feedback in the log on failure. --- diff --git a/tests/data/data-in.at b/tests/data/data-in.at index 03125b55..05dc10ff 100644 --- a/tests/data/data-in.at +++ b/tests/data/data-in.at @@ -3413,7 +3413,8 @@ AT_CLEANUP AT_SETUP([binary and hexadecimal input (IB, PIB, and PIBHEX formats)]) AT_CHECK([$PERL -e 'print pack "n", $_ foreach 0...65535' > binhex-in.data]) -AT_CHECK([test `wc -c < binhex-in.data` -eq 131072], [0]) +AT_CHECK([wc -c < binhex-in.data | sed 's/[ ]//g'], [0], [131072 +]) AT_DATA([binhex-in.sps], [dnl SET RIB=MSBFIRST. SET ERRORS=NONE. @@ -3433,7 +3434,8 @@ AT_CLEANUP AT_SETUP([BCD input (P and PK formats)]) AT_CHECK([$PERL -e 'print pack "n", $_ foreach 0...65535' > bcd-in.data]) -AT_CHECK([test `wc -c < bcd-in.data` -eq 131072], [0]) +AT_CHECK([wc -c < bcd-in.data | sed 's/[ ]//g'], [0], [131072 +]) AT_DATA([bcd-in.sps], [dnl SET ERRORS=NONE. SET MXWARNS=10000000. @@ -3452,7 +3454,8 @@ AT_CLEANUP AT_SETUP([legacy input (N and Z formats)]) AT_CHECK([$PERL -e 'print pack "n", $_ foreach 0...65535' > legacy-in.data]) -AT_CHECK([test `wc -c < legacy-in.data` -eq 131072], [0]) +AT_CHECK([wc -c < legacy-in.data | sed 's/[ ]//g'], [0], [131072 +]) AT_DATA([legacy-in.sps], [dnl SET ERRORS=NONE. SET MXWARNS=10000000.