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/t0004-heartbeat-timeout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t0004-heartbeat-timeout.sh') diff --git a/t/t0004-heartbeat-timeout.sh b/t/t0004-heartbeat-timeout.sh index b96584d..c08edeb 100755 --- a/t/t0004-heartbeat-timeout.sh +++ b/t/t0004-heartbeat-timeout.sh @@ -34,7 +34,7 @@ t_begin "block the worker process to force it to die" && { t_begin "ensure worker was killed" && { test -e $ok - test 1 -eq $(grep timeout $r_err | grep killing | wc -l) + test 1 -eq $(grep timeout $r_err | grep killing | count_lines) } t_begin "ensure timeout took at least 3 seconds" && { -- cgit v1.2.3-24-ge0c7