about summary refs log tree commit homepage
path: root/t/t0034-pipelined-pipe-response.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-02-04 12:39:09 +0000
committerEric Wong <normalperson@yhbt.net>2013-02-04 13:38:13 +0000
commite6faf9e26bcb172026a4984ecadbaa8b6789bcb7 (patch)
tree37d8b44818b1f62b7c285124073c85fa50e202e5 /t/t0034-pipelined-pipe-response.sh
parentf4e3bac180ff01256832f98655636f79b52f9d5b (diff)
downloadrainbows-e6faf9e26bcb172026a4984ecadbaa8b6789bcb7.tar.gz
On FreeBSD 9.0, "wc -l" emits leading whitespace, so
filter it through tr -d '[:space:]' to eliminate it.
Diffstat (limited to 't/t0034-pipelined-pipe-response.sh')
-rwxr-xr-xt/t0034-pipelined-pipe-response.sh4
1 files changed, 2 insertions, 2 deletions
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" && {