aboutsummaryrefslogtreecommitdiff
path: root/test/T490-parse-time-string.sh
AgeCommit message (Collapse)Author
2023-07-21test: support testing notmuch as installedDavid Bremner
We put some effort into testing the built copy rather than some installed copy. On the other hand for people like packagers, testing the installed copy is also of interest. When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not require a built notmuch tree or running configure. Some of the tests marked as broken when running against installed notmuch are probably fixable.
2021-05-17test: more style fixesFelipe Contreras
In order to fit the git coding style. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2017-10-20test: use $(dirname "$0") for sourcing test-lib.shJani Nikula
Don't assume the tests are always run from within the source tree.
2015-08-07test: make script exit (1) if it "fails" to source (.) a fileTomi Ollila
The files (test) scripts source (with builtin command `.`) provides information which the scripts depend, and without the `source` to succeed allowing script to continue may lead to dangerous situations (e.g. rm -rf "${undefined_variable}"/*). At the end of all source (.) lines construct ' || exit 1' was added; In our case the script script will exit if it cannot find (or read) the file to be sourced. Additionally script would also exits if the last command of the sourced file exited nonzero.
2015-03-07parse-time-string: fix setting and rounding of secondsJani Nikula
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-06test: extract and flag second rounding tests as brokenJani Nikula
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-06test: add some more time testsJani Nikula
Ensure the seconds are set properly.
2015-03-06test: improve the time parsing testsJani Nikula
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.
2014-01-13test: renamed test scripts to format T\d\d\d-name.shTomi Ollila
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.