From 8a6117a22a7d01eeb5adc63d3152acf435cd3176 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 24 Jan 2013 23:33:54 +0000 Subject: tests: "wc -c" portability for *BSDs On FreeBSD 9.0, "wc -c" emits leading whitespace, so filter it through tr -d '[:space:]' to eliminate it. --- t/t9001-sendfile-to-path.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t9001-sendfile-to-path.sh') diff --git a/t/t9001-sendfile-to-path.sh b/t/t9001-sendfile-to-path.sh index 5a9fdcd..4e4012c 100755 --- a/t/t9001-sendfile-to-path.sh +++ b/t/t9001-sendfile-to-path.sh @@ -40,7 +40,7 @@ t_begin "X-Sendfile does not show up in headers" && { } t_begin "Content-Length is set correctly in headers" && { - expect=$(wc -c < random_blob) + expect=$(count_bytes < random_blob) grep "^< Content-Length: $expect" $curl_err } -- cgit v1.2.3-24-ge0c7