From e6faf9e26bcb172026a4984ecadbaa8b6789bcb7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 4 Feb 2013 12:39:09 +0000 Subject: tests: "wc -l" portability for *BSDs On FreeBSD 9.0, "wc -l" emits leading whitespace, so filter it through tr -d '[:space:]' to eliminate it. --- t/t0106-rack-input-keepalive.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't/t0106-rack-input-keepalive.sh') diff --git a/t/t0106-rack-input-keepalive.sh b/t/t0106-rack-input-keepalive.sh index 4bc65a1..3862e16 100755 --- a/t/t0106-rack-input-keepalive.sh +++ b/t/t0106-rack-input-keepalive.sh @@ -34,7 +34,7 @@ t_begin "send big pipelined chunked requests" && { t_begin "check responses" && { dbgcat tmp - test 4 -eq $(grep $random_blob_sha1 $tmp | wc -l) + test 4 -eq $(grep $random_blob_sha1 $tmp | count_lines) } t_begin "send big pipelined identity requests" && { @@ -58,7 +58,7 @@ t_begin "send big pipelined identity requests" && { t_begin "check responses" && { dbgcat tmp - test 3 -eq $(grep $random_blob_sha1 $tmp | wc -l) + test 3 -eq $(grep $random_blob_sha1 $tmp | count_lines) } t_begin "send pipelined identity requests" && { @@ -83,7 +83,7 @@ t_begin "send pipelined identity requests" && { t_begin "check responses" && { dbgcat tmp - test 3 -eq $(grep $body_sha1 $tmp | wc -l) + test 3 -eq $(grep $body_sha1 $tmp | count_lines) } t_begin "send pipelined chunked requests" && { @@ -111,7 +111,7 @@ t_begin "send pipelined chunked requests" && { t_begin "check responses" && { dbgcat tmp - test 3 -eq $(grep $body_sha1 $tmp | wc -l) + test 3 -eq $(grep $body_sha1 $tmp | count_lines) } t_begin "kill server" && kill $rainbows_pid -- cgit v1.2.3-24-ge0c7