#!/usr/bin/env bash
test_description="date/time parser module"
-. ./test-lib.sh
+. $(dirname "$0")/test-lib.sh || exit 1
# 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 "$*"
}
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 <<EOF > INPUT
9:15 ==> Tue Jan 11 09:15:14 +0000 2011