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/t0034-pipelined-pipe-response.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t0034-pipelined-pipe-response.sh') diff --git a/t/t0034-pipelined-pipe-response.sh b/t/t0034-pipelined-pipe-response.sh index 2d28f86..59df69f 100755 --- a/t/t0034-pipelined-pipe-response.sh +++ b/t/t0034-pipelined-pipe-response.sh @@ -62,7 +62,7 @@ t_begin "staggered pipeline of 3 HTTP requests" && { wait echo ok >> $ok ) | socat - TCP:$listen > $dd_fifo - test 2 -eq $(grep '^ok$' $ok |wc -l) + test 2 -eq $(grep '^ok$' $ok |count_lines) } t_begin "pipeline 3 HTTP requests" && { @@ -77,7 +77,7 @@ t_begin "pipeline 3 HTTP requests" && { wait echo ok >> $ok ) | socat - TCP:$listen > $fifo - test 2 -eq $(grep '^ok$' $ok |wc -l) + test 2 -eq $(grep '^ok$' $ok |count_lines) } t_begin "shutdown server" && { -- cgit v1.2.3-24-ge0c7