diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2020-06-06 17:02:54 +0200 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2020-06-06 17:02:54 +0200 |
commit | e402c027fbf70778129d32ac2b7f66e764ede173 (patch) | |
tree | 7b295e771612c564857802895a9b8d2ea64ce67d | |
parent | 500a47558c33b680c219e3f42b89aac4543f7682 (diff) | |
download | calendar-cli-e402c027fbf70778129d32ac2b7f66e764ede173.zip |
more tests, including one that breaks until https://github.com/tobixen/calendar-cli/issues/49 is fixed
-rwxr-xr-x | tests/tests.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tests.sh b/tests/tests.sh index 703d268..9718709 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -75,10 +75,25 @@ uid=$(echo $output | perl -ne '/uid=(.*)$/ && print $1') echo "## fetching the full day event, in ics format" calendar_cli --icalendar calendar agenda --from-time=2010-10-13 --agenda-days=1 echo "$output" | grep -q "whole day" || error "could not find the event" +echo "$output" | grep -q "20101013" || error "could not find the date" +echo "$output" | grep -q "20101013T" && error "a supposed whole day event was found to be with the time of day" echo "OK: found the event" +echo "## cleanup, delete it" calendar_cli calendar delete --event-uid=$uid +echo "## A full day event should be implicit when giving dates rather than timestamps" +calendar_cli calendar add '2010-10-10+3d' 'whole day testing' +uid=$(echo $output | perl -ne '/uid=(.*)$/ && print $1') +[ -n "$uid" ] || error "got no UID back" + +echo "## fetching the full day event, in ics format" +calendar_cli --icalendar calendar agenda --from-time=2010-10-13 --agenda-days=1 +echo "$output" | grep -q "whole day" || error "could not find the event" +echo "$output" | grep -q "20101013" || error "could not find the date" +echo "$output" | grep -q "20101013T" && error "a supposed whole day event was found to be with the time of day" +echo "OK: found the event" + ## TODOS / TASK LISTS |