From 04c3ce58d4e2d15477d36654c3f7f3269c9a7a03 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 2 Nov 2010 06:39:05 -0700 Subject: [PATCH] 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. --- tests/data/data-in.at | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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. -- 2.30.2