X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT490-parse-time-string.sh;h=3b6e48c42aefe040ec926c1e634bab3c9ffbc7a0;hb=HEAD;hp=9247bdf89543f2c2a9c8d97b2c795087bc348840;hpb=952f46fedc0d385650e00ad739814a0127e13fa1;p=notmuch diff --git a/test/T490-parse-time-string.sh b/test/T490-parse-time-string.sh index 9247bdf8..3b6e48c4 100755 --- a/test/T490-parse-time-string.sh +++ b/test/T490-parse-time-string.sh @@ -1,16 +1,18 @@ #!/usr/bin/env bash test_description="date/time parser module" -. ./test-lib.sh +. $(dirname "$0")/test-lib.sh || exit 1 + +if [ -n "${NOTMUCH_TEST_INSTALLED-}" ]; then + test_done +fi # Sanity/smoke tests for the date/time parser independent of notmuch -_date () -{ +_date () { date -d "$*" +%s } -_parse_time () -{ +_parse_time () { ${TEST_DIRECTORY}/parse-time --format=%s "$*" } @@ -79,7 +81,6 @@ ${TEST_DIRECTORY}/parse-time --ref=${REFERENCE} < INPUT > OUTPUT test_expect_equal_file INPUT OUTPUT test_begin_subtest "Second rounding tests" -test_subtest_known_broken REFERENCE=$(_date Tue Jan 11 12:13:14 +0000 2011) cat < INPUT 9:15 ==> Tue Jan 11 09:15:14 +0000 2011