mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
test: extract and flag second rounding tests as broken
Extract and add some more tests relating to rounding seconds into a separate subtest, and flag it as broken. If seconds are not specified, the time is not set or rounded according to the interface defined in parse-time-string/parse-time-string.h. Instead, seconds are always set to 00 in reality, which is broken.
This commit is contained in:
parent
65dee41fb6
commit
952f46fedc
1 changed files with 14 additions and 2 deletions
|
@ -40,8 +40,6 @@ two mo ==> Thu Nov 11 12:13:14 +0000 2010
|
|||
5m ==> Tue Jan 11 12:08:14 +0000 2011
|
||||
dozen mi ==> Tue Jan 11 12:01:14 +0000 2011
|
||||
8am ==> Tue Jan 11 08:00:00 +0000 2011
|
||||
9:15 ==> Tue Jan 11 09:15:00 +0000 2011
|
||||
12:34 ==> Tue Jan 11 12:34:00 +0000 2011
|
||||
monday ==> Mon Jan 10 12:13:14 +0000 2011
|
||||
yesterday ==> Mon Jan 10 12:13:14 +0000 2011
|
||||
tomorrow ==> ERROR: KEYWORD
|
||||
|
@ -80,4 +78,18 @@ EOF
|
|||
${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 <<EOF > INPUT
|
||||
9:15 ==> Tue Jan 11 09:15:14 +0000 2011
|
||||
12:34 ==> Tue Jan 11 12:34:14 +0000 2011
|
||||
10:30 ==> Tue Jan 11 10:30:14 +0000 2011
|
||||
10:30 ==^> Tue Jan 11 10:30:59 +0000 2011
|
||||
10:30 ==^^> Tue Jan 11 10:31:00 +0000 2011
|
||||
10:30 ==_> Tue Jan 11 10:30:00 +0000 2011
|
||||
EOF
|
||||
${TEST_DIRECTORY}/parse-time --ref=${REFERENCE} < INPUT > OUTPUT
|
||||
test_expect_equal_file INPUT OUTPUT
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue