Commit graph

5 commits

Author SHA1 Message Date
Jani Nikula
6aeef2ee15 parse-time-string: fix setting and rounding of seconds
If seconds are not specified in the string to be parsed, they're not
set according to the reference time (in the no rounding case) nor
rounded properly (in the rounding up cases). Fix this.

The bug caused searches such as date:10:30..10:30 to match messages
with date exactly 10:30:00 only, and not in range 10:30:00..10:30:59
(inclusive) as documented.

Note that date searches referring "noon" or "5pm" will still be
interpreted as exact to the second.
2015-03-07 10:20:33 +01:00
Jani Nikula
952f46fedc 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.
2015-03-06 21:36:20 +01:00
Jani Nikula
65dee41fb6 test: add some more time tests
Ensure the seconds are set properly.
2015-03-06 21:36:11 +01:00
Jani Nikula
fd80a9cac1 test: improve the time parsing tests
Set the reference time to 12:13:14 instead of 11:11:00 to ensure hours
and minutes are not mixed up, and seconds are really set instead of
defaulted to 00.
2015-03-06 21:35:58 +01:00
Tomi Ollila
a755c9d6a9 test: renamed test scripts to format T\d\d\d-name.sh
All test scripts to be executed are now named as T\d\d\d-name.sh,
numers in increments of 10.

This eases adding new tests and developers to see which are test scripts
that are executed by test suite and in which order.
2014-01-13 14:16:46 -04:00
Renamed from test/parse-time-string (Browse further)