aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* test/Makefile.am: Add apts-dst to EXTRA_DISTLukas Fleischer2019-10-181-0/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Test for DST and recurrent itemsLars Henriksen2019-10-181-1/+2
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Test cases for "Fix monthly and yearly recurrence algorithms"Lars Henriksen2019-09-061-1/+2
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Test cases for impossible dates in recurrence ruleLars Henriksen2019-05-201-1/+2
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* New test cases for next appoinmentLars Henriksen2019-04-131-0/+2
| | | | | | | | The change by commit "Fix display of time left before next appointment" is not detected by the existing test because the time set has zero seconds. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* test/Makefile.am: Add missing data file to EXTRA_DISTLukas Fleischer2017-11-021-0/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Gracefully parse iCal parameters with colonsLukas Fleischer2017-02-071-0/+1
| | | | | | | | | | | | According to RFC 5545, iCalendar content lines can have optional parameters, which can be quoted strings containing colons (":"). Make sure that such colons are not interpreted as delimiters marking the start of the value string. Also, add a test case that covers this corner case. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Do not assume that days always have 86400 secondsLukas Fleischer2016-03-271-0/+2
| | | | | | | | Make that date membership is computed correctly, even if a day has less than 86400 seconds (e.g. after changing clocks). Reported-by: Hakan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add support for UTC times in iCal importsLukas Fleischer2015-02-231-0/+2
| | | | | | | | | | | | | | According to the iCal standard (4.3.12 Time): UTC time, or absolute time, is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90), the UTC designator, appended to the time value. Parse such time values properly when importing iCal files. Fixes GitHub issue #3. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/Makefile.am: Add missing testLukas Fleischer2014-08-181-0/+2
| | | | | | | We added ical-005 in f3fe3c8 (Gracefully handle all day events in iCal imports, 2014-08-18) but forgot to add entries to the Makefile. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Correctly parse all types of iCal durationsLukas Fleischer2014-08-181-0/+2
| | | | | | | | This was supposed to be fixed in 6ca2535 (ical.c: Simplify and fix ical_durtime2long(), 2014-07-28) but some cases were not covered. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Handle CRLF line endings in iCal filesLukas Fleischer2014-08-181-0/+2
| | | | | | | | RFC 2445 mentions that CRLF line endings may be used in iCal files. Handle them properly when importing. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use backwards-compatible out format for queriesLukas Fleischer2014-08-061-0/+2
| | | | | | | | | | | Print TODO items before appointments in query outputs and add an empty line between the list of TODO items and the list of appointments. This is how items were printed before the big parser refactoring. Also, add a test to ensure we do not unintentionally change that format in the future. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* tests/: Add basic iCal import testsLukas Fleischer2014-07-281-0/+6
| | | | | | | | Tests ical-002.sh and ical-003.sh currently fail due to bugs in duration and exception parsing. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/Makefile.am: Add missing test dataLukas Fleischer2014-07-081-0/+27
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Implement test initialization properlyLukas Fleischer2014-07-081-1/+4
| | | | | | | Make test-init.sh work even if tests are executed from another directory. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add a couple of black-box tests for itemsLukas Fleischer2013-02-271-0/+27
| | | | | | | This introduces five test suite failures which will be fixed in one of the following patches. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/Makefile.am: Add missing files to EXTRA_DISTLukas Fleischer2012-12-051-1/+7
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add a couple of tests for recurrent itemsLukas Fleischer2012-11-261-1/+6
| | | | | | | | | | | | | This adds tests for following features/scenarios: * Recurrent appointments and events of all (repetition) types. * Recurrent appointments with a duration of more than 24 hours. * Overlapping recurrent appointments. * Recurrent items and leap years. * Recurrent items with an end date. * Recurrent items with exceptions. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add a test case to reproduce BUG#2Lukas Fleischer2012-06-301-1/+2
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Use correct calcurse binary and data dirLukas Fleischer2012-02-241-0/+4
| | | | | | | | | | We really don't want to use the calcurse(1) binary from "$PATH" here. Introduce an environment variable "$CALCURSE" which can be used specify the binary to use and set this variable to the binary located in the build directory by default. Similarly, add another environment variable "$DATA_DIR" that can be used to specify a data directory. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/Makefile.am: Add tests to "EXTRA_DIST"Lukas Fleischer2012-02-241-0/+1
| | | | | | | | Add tests and the dummy data directory to "EXTRA_DIST" since we want these to be shipped in distribution tarballs. Spotted with `make distcheck`. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* {src,test}/Makefile.am: Enable pedantic warningsLukas Fleischer2012-02-191-0/+2
| | | | | | | | Now that we're fully POSIX compliant and fixed up some minor issues with ISO C99, use "-std=c99 -pedantic -D_POSIX_C_SOURCE=200809L" as default build flags for calcurse and the test suite. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add test case for "-S" (pattern search)Lukas Fleischer2012-01-221-1/+2
| | | | | | | * search-001.sh: Compare the output of "-S <regex>" (using a regular expression) with hardcoded data. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add test cases for "-a" and "-n"Lukas Fleischer2012-01-221-1/+3
| | | | | | | * appointment-001.sh: Compare output of "-a" with hardcoded data. * next-001.sh: Compare output of "-n" with hardcoded data. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add test cases for "-d" and "-s"/"-r"Lukas Fleischer2012-01-221-1/+7
| | | | | | | | | | | * day-001.sh: Compare output of "-d<date>" with hardcoded data. * day-002.sh: Compare output of "-d<num>" with hardcoded data. * day-003.sh: Compare output of "-d<num>" with "-s<date> -r<num>". * range-001.sh: Compare output of "-r" with hardcoded data. * range-002.sh: Compare output of "-r<num>" with hardcoded data. * range-003.sh: Compare output of "-r<num>" with "-s<date> -r<num>". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add generic tests for todo operationsLukas Fleischer2012-01-221-1/+4
| | | | | | | | | | | * todo-001.sh: Tests the "-t" command line option (calculates expected output by parsing the todo data file). * todo-002.sh: Tests "-t<num>" in a way similar to todo-001.sh. * todo-003.sh: Tests "-t0" in a way similar to todo-001.sh. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add three basic self testsLukas Fleischer2012-01-221-0/+6
| | | | | | | | | | | | | | | * true-001.sh: Always returns true - this should never ever fail. * run-test-001.sh: Invokes run-test, passing itself as a parameter. Subsequently, it outputs the very same (hardcoded) expected and actual values. * run-test-002.sh: Tests run-test's negative assertion feature in a way similar to run-test-001.sh. However, output different (hardcoded) expected and actual values and invoke run-test with the negative test prefix ('!'). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add a minimal test suiteLukas Fleischer2012-01-211-0/+6
Introduce a new "test/" sub-directory that contains tests for calcurse. Right now, it only includes the quick-and-dirty "run-test" helper that can be used to run and verify tests: $ ./run-test test-1 test-2 test-3 test-4 Running test-1... ok Running test-2... ok Running test-3... FAIL Each argument passed to run-test must be a test script located in the current directory. run-test invokes each script twice and passes the command line argument "expected" and "actual", respectively. A test case succeeds if both "expected" and "actual" instances return with a zero exit status and produce exactly the same output. It fails otherwise. run-test terminates with a non-zero exit status as soon as one of the test fails. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>