From 500a47558c33b680c219e3f42b89aac4543f7682 Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Sat, 6 Jun 2020 16:38:28 +0200 Subject: more test code, preparing to work with https://github.com/tobixen/calendar-cli/issues/49 --- tests/tests.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/tests.sh b/tests/tests.sh index 7a57f46..703d268 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -67,6 +67,19 @@ echo "## Searching again for the deleted event" calendar_cli calendar agenda --from-time=2010-10-10 --agenda-days=1 echo $output | { grep -q 'testing testing' && echo "## FAIL: still found the event" ; } || echo "## OK: didn't find the event" +echo "## Adding a full day event" +calendar_cli calendar add --whole-day '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 "OK: found the event" + +calendar_cli calendar delete --event-uid=$uid + + ## TODOS / TASK LISTS echo "## Attempting to add a task with category 'scripttest'" -- cgit v1.2.3