diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-01-24 23:13:41 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-02-01 21:46:27 +0000 |
commit | 0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7 (patch) | |
tree | 90fe5c93c6b05a8a8613d6557dfcb3a10f68de9d /t/test-lib.sh | |
parent | cbff7b0892148b037581541184364e0e91d2a138 (diff) | |
download | rainbows-0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7.tar.gz |
"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
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 55deb41..8921da6 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -38,6 +38,11 @@ require_check () { fi } +# "date +%s" is not in POSIX, but in GNU, and FreeBSD 9.0 (possibly earlier) +unix_time () { + $RUBY -e 'puts Time.now.to_i' +} + skip_models () { for i in "$@" do |