From 37c5ded73d52bfa1962d0ec352402b4e894c6c9a Mon Sep 17 00:00:00 2001
From: John Darrington <john@darrington.wattle.id.au>
Date: Sat, 30 Oct 2010 18:16:32 +0200
Subject: [PATCH] Make tests which use wc more robust.

It appears that some systems' "wc" command  format their output
differently.  So this change uses a numeric comparison rather
than a string comparison.
---
 tests/data/data-in.at | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/data/data-in.at b/tests/data/data-in.at
index bfdf9ef5..03125b55 100644
--- a/tests/data/data-in.at
+++ b/tests/data/data-in.at
@@ -3413,8 +3413,7 @@ 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([wc -c < binhex-in.data], [0], [131072
-])
+AT_CHECK([test `wc -c < binhex-in.data` -eq 131072], [0])
 AT_DATA([binhex-in.sps], [dnl
 SET RIB=MSBFIRST.
 SET ERRORS=NONE.
@@ -3434,8 +3433,7 @@ 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([wc -c < bcd-in.data], [0], [131072
-])
+AT_CHECK([test `wc -c < bcd-in.data` -eq 131072], [0])
 AT_DATA([bcd-in.sps], [dnl
 SET ERRORS=NONE.
 SET MXWARNS=10000000.
@@ -3454,8 +3452,7 @@ 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([wc -c < legacy-in.data], [0], [131072
-])
+AT_CHECK([test `wc -c < legacy-in.data` -eq 131072], [0])
 AT_DATA([legacy-in.sps], [dnl
 SET ERRORS=NONE.
 SET MXWARNS=10000000.
-- 
2.30.2