summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-02-13 16:30:05 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-02-13 16:39:30 -0500
commit95f862fdd82a99e30bbf2c43009ec9a51e416804 (patch)
tree0edafaf7a69935d56dc4ce8b442325e12dfd88ff /tests.sh
parent2cdc648441794db0f84518f79e8aaf3ead68f110 (diff)
downloadbfs-95f862fdd82a99e30bbf2c43009ec9a51e416804.tar.xz
parse: Handle 1969-12-31T23:59:59Z
mktime() returns -1 on error, but also for one second before the epoch. Compare the input against localtime(-1) to distinguish those cases.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 3893251..d1c5413 100755
--- a/tests.sh
+++ b/tests.sh
@@ -343,6 +343,7 @@ bsd_tests=(
test_newerma
test_newermt
+ test_newermt_epoch_minus_one
test_nogroup
test_nogroup_ulimit
@@ -492,6 +493,7 @@ gnu_tests=(
test_newerma
test_newermt
+ test_newermt_epoch_minus_one
test_nogroup
test_nogroup_ulimit
@@ -1364,6 +1366,10 @@ function test_newermt() {
bfs_diff times -newermt 1991-12-14T00:01
}
+function test_newermt_epoch_minus_one() {
+ bfs_diff times -newermt 1969-12-31T23:59:59Z
+}
+
function test_size() {
bfs_diff basic -type f -size 0
}