From 0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 24 Jan 2013 23:13:41 +0000 Subject: tests: replace non-portable "date +%s" with ruby equivalent "date +%s" is not in POSIX (it is in GNU, and at least FreeBSD 9.0, possibly earlier). The Ruby equivalent should be sufficiently portable between different Ruby versions. This change was automated via: perl -i -p -e 's/date \+%s/unix_time/' t/*.sh --- t/t0017-keepalive-timeout-zero.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t0017-keepalive-timeout-zero.sh') diff --git a/t/t0017-keepalive-timeout-zero.sh b/t/t0017-keepalive-timeout-zero.sh index b4085e8..a3f27da 100755 --- a/t/t0017-keepalive-timeout-zero.sh +++ b/t/t0017-keepalive-timeout-zero.sh @@ -16,12 +16,12 @@ t_begin 'check server responds with Connection: close' && { t_begin "send keepalive response that does not expect close" && { req='GET / HTTP/1.1\r\nHost: example.com\r\n\r\n' - t0=$(date +%s) + t0=$(unix_time) ( cat $fifo > $tmp & printf "$req" wait - date +%s > $ok + unix_time > $ok ) | socat - TCP:$listen > $fifo now="$(cat $ok)" elapsed=$(( $now - $t0 )) -- cgit v1.2.3-24-ge0c7