about summary refs log tree commit homepage
path: root/t/t0003-reopen-logs.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-01-24 23:33:54 +0000
committerEric Wong <normalperson@yhbt.net>2013-02-01 21:46:27 +0000
commit8a6117a22a7d01eeb5adc63d3152acf435cd3176 (patch)
tree121c3fa707d28110e704dd6fd87cff985a5616a8 /t/t0003-reopen-logs.sh
parent0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7 (diff)
downloadrainbows-8a6117a22a7d01eeb5adc63d3152acf435cd3176.tar.gz
On FreeBSD 9.0, "wc -c" emits leading whitespace, so
filter it through tr -d '[:space:]' to eliminate it.
Diffstat (limited to 't/t0003-reopen-logs.sh')
-rwxr-xr-xt/t0003-reopen-logs.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t0003-reopen-logs.sh b/t/t0003-reopen-logs.sh
index 8e2cdc5..cecd926 100755
--- a/t/t0003-reopen-logs.sh
+++ b/t/t0003-reopen-logs.sh
@@ -86,11 +86,11 @@ t_begin "rotated stderr is clean" && {
 }
 
 t_begin "server is now writing logs to new stderr" && {
-        before_rot=$(wc -c < $r_rot)
-        before_err=$(wc -c < $r_err)
+        before_rot=$(count_bytes < $r_rot)
+        before_err=$(count_bytes < $r_err)
         curl -sSfv http://$listen/
-        after_rot=$(wc -c < $r_rot)
-        after_err=$(wc -c < $r_err)
+        after_rot=$(count_bytes < $r_rot)
+        after_err=$(count_bytes < $r_err)
         test $after_rot -eq $before_rot
         test $after_err -gt $before_err
 }