aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
Commit message (Collapse)AuthorAgeFilesLines
* Update use of note file for importLars Henriksen2020-08-263-22/+12
| | | | | | | | | | | Removes the parts of commit 'Extend use of note file for ical import' that relate to STATUS. The STATUS property is (partly) supported for todos already. Corrects insertion of a separator: always insert it before imported properties (also when there is no description). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Extend import of recurrence rulesLars Henriksen2020-06-132-1/+257
| | | | | | | | Support has been implemented for recurrence rule parts BYMONTH, BYMONTHDAY and BYDAY. A new test has been added. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update import of basic recurrence rulesLars Henriksen2020-06-132-0/+38
| | | | | | | | | | | | | | | | | | | Conversion of COUNT to UNTIL was a simple calculation which assumed one repetiton per period (day, week, month or year); it does not take exception days and invalid dates into account. Solved by a new function which returns the n'th occurrence of a recurrence rule. In calcurse UNTIL is interpreted as a day (DATE), in RFC 5545 as a time of day (DATE-TIME). This has implications when a recurrence rule has an occurrence on the UNTIL day, see comment in ical.c An "Import:" note is added when a multi-day event is imported and turned into a calcurse all-day event. Icalendar quotes in comments have been updated to RFC 5545. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Support import of time zones (RFC 5545)Lars Henriksen2020-06-132-2/+7
| | | | | | | | | The property parameter time zone identifier (TZID) is recognized in DTSTART, DTEND and EXDATE and the DATE-TIME value converted to a local time. The time zone identifier is logged in the note file. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix recurrence rule expansion with ordered weekdayLars Henriksen2020-05-121-0/+1
| | | | | | | | | | | | | | When the order of a weekday in BYDAY rule expansion (like -5SA or 5SU for monthly or 55WE for yearly) exceeds the number of available weekdays in the period (month or year), rule expansion with negative order could result in a floating point exception. The reason: the modified frequency might become zero. Solution. Check order against number of available weekdays and terminate expansion early whenever possible (also for positive orders). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Take value data type of event start into account in iCal import/exportLars Henriksen2020-05-031-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch derives the item type (appointment or event) from the DTSTART value type. It is then used to perform an extended check of date/time values and reject non-conformant import files (like those reported in Github issues #81, (calcurse) events. The patch includes parsing and code corrections and minor refactoring. Background: Ical events are of two types, in calcurse called appointments and events. RFC 5545 has no distinguishing names for them, but describes them in section 3.6.1. The event type is derived from the value type of the DTSTART property. The value type may be either DATE-TIME (appointment) or DATE (event). If not specified by a VALUE property parameter in DTSTART, the default value type is DATE-TIME. The value type must be set explicitly to DATE to get an event. Other properties and rrule parts must agree with the DTSTART value type (DTEND, DURATION, EXDATE and UNTIL). Previously the type of an imported event was derived from the format of the DTSTART value. The DTSTART value type was not taken into account when importing, and not specified for recurring events when exporting (commit 0114289 solved it for events, see GitHub PR #97). Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Tests for recurrence rule extensionsLars Henriksen2020-04-281-0/+27
| | | | | | Test cases include all the examples from RFC5545 which are supported. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Extend use of note file for iCal importLars Henriksen2020-04-282-0/+106
| | | | | | | | | | iCal import to an item note file is extended from DESCRIPTION to LOCATION, COMMENT and STATUS for both events and todos. Addresses GitHub issue #9. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Extend iCalendar import testsLars Henriksen2020-03-223-0/+71
| | | | | | | | Tests ical-010.sh and ical-011.sh assume that Github issue #265 has been fixed (escape-encoding by export). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix decoding of escaped characters in imported textLars Henriksen2020-03-222-3/+3
| | | | | | | | Stick strictly to RFC 5545, 3.3.11, Text, for SUMMARY and DESCRIPTION. Adresses Github issue #271. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Test for DST and recurrent itemsLars Henriksen2019-10-181-0/+7
| | | | | 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-0/+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-0/+2
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* CLI: tests alignedLars Henriksen2019-01-071-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Gracefully parse iCal parameters with colonsLukas Fleischer2017-02-071-0/+12
| | | | | | | | | | | | 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/+1
| | | | | | | | 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/+13
| | | | | | | | | | | | | | 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>
* Handle dates past January 19th, 2038Lukas Fleischer2015-02-071-0/+4
| | | | | | Try to support dates past year 2038 on systems with 64-bit time_t. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/data/ical-006.ical: Remove timezonesLukas Fleischer2014-08-181-12/+12
| | | | | | | This are neither needed for the tests nor supported by the iCal import. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Correctly parse all types of iCal durationsLukas Fleischer2014-08-181-0/+63
| | | | | | | | 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>
* Gracefully handle all day events in iCal importsLukas Fleischer2014-08-181-0/+23
| | | | | | | | | Do not create two events when importing an event that lasts an entire day. Reported-by: Jörn Tillmanns <tillmanns@tuxzone.org> 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/+12
| | | | | | | | 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>
* test/: Fix date in ical-001Lukas Fleischer2014-08-181-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use backwards-compatible out format for queriesLukas Fleischer2014-08-061-0/+8
| | | | | | | | | | | 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-283-0/+65
| | | | | | | | 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/: Add a couple of black-box tests for itemsLukas Fleischer2013-02-2727-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/: Add a couple of tests for recurrent itemsLukas Fleischer2012-11-261-0/+12
| | | | | | | | | | | | | 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-0/+2
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/data/apts: Add a fair bit of items to 01/01/1902Lukas Fleischer2012-06-301-0/+141
| | | | | | | This might turn out to be useful if we want to do performance tests and check what happens if a day with a large amount of items is processed. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/data/conf: Update with recent changesLukas Fleischer2012-05-311-1/+1
| | | | | | | | | Update the value of "appearance.calendarview" used in the default configuration file of our test suite (we now use "monthly"/"weekly" instead of integer values). Late fix for what we broke in commit 2c5235cca70bf1c5b5e92dd5b6b178ab13b695f2. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix data type of "general.firstdayofweek"Lukas Fleischer2012-05-171-1/+1
| | | | | | | | | | | This option wasn't converted to a proper data type when it was renamed from "week_begins_on_monday" to "general.firstdayofweek". Convert the boolean option into an enumeration type that can take the values "monday" and "sunday". Also, update the documentation, add a conversion rule to the upgrade script and convert the configuration file used in the test suite. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/data/conf: Update variable namesLukas Fleischer2012-03-291-22/+22
| | | | | | | Update the default configuration file used in our test suite to match the new configuration variable naming scheme. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Add test cases for "-d" and "-s"/"-r"Lukas Fleischer2012-01-221-0/+660
| | | | | | | | | | | * 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-0/+197
| | | | | | | | | | | * 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 initial configuration fileLukas Fleischer2012-01-221-0/+75
As a preparation for our test cases (needed for date formatting etc.) Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>