summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2018-12-17 12:22:17 +0100
committerTobias Brox <tobias@redpill-linpro.com>2018-12-17 12:22:22 +0100
commit54f2b431ee102b89738080b3eb8fdeb09d2b32d4 (patch)
tree09cbfc2212e1ea7f7d586d895503e7ca2b1d917d
parentf713dfd5b75faec29519b0601f05a0513a86340c (diff)
downloadcalendar-cli-54f2b431ee102b89738080b3eb8fdeb09d2b32d4.zip
testing with non-ascii characters in location field, ref https://github.com/tobixen/calendar-cli/issues/45
-rwxr-xr-xtests/script_test.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/script_test.sh b/tests/script_test.sh
index 33f8530..a32bc64 100755
--- a/tests/script_test.sh
+++ b/tests/script_test.sh
@@ -26,6 +26,7 @@ calendar_cli() {
## CLEANUP from earlier failed test runs
for uid in $($calendar_cli calendar agenda --from-time=2010-10-10 --agenda-days=1 --event-template='{uid}') ; do calendar_cli calendar delete --event-uid=$uid ; done
+calendar_cli todo --categories scripttest delete
## TESTING
@@ -39,7 +40,7 @@ echo "## Attempting to add a past event at 2010-10-09 20:00:00, 2 hours duration
calendar_cli calendar add '2010-10-09 20:00:00+2h' 'testing testing'
uid=$(echo $output | perl -ne '/uid=(.*)$/ && print $1')
echo "## Attempting to add a past event at 2010-10-10 20:00:00, CET (1 hour duration is default)"
-calendar_cli calendar add '2010-10-10 20:00:00+01:00' 'testing testing' --set-description='this is a test calendar event'
+calendar_cli calendar add '2010-10-10 20:00:00+01:00' 'testing testing' --set-description='this is a test calendar event' --set-location='Москва'
uid2=$(echo $output | perl -ne '/uid=(.*)$/ && print $1')
echo "## Attempting to add a past event at 2010-10-11 20:00:00, CET, 3h duration"
calendar_cli calendar add '2010-10-11 20:00:00+01:00+3h' 'testing testing'
@@ -47,8 +48,8 @@ uid3=$(echo $output | perl -ne '/uid=(.*)$/ && print $1')
echo "## OK: Added the event, uid is $uid"
echo "## Taking out the agenda for 2010-10-09 + four days"
-calendar_cli calendar agenda --from-time=2010-10-09 --agenda-days=4 --event-template='{description}'
-echo $output | { grep -q 'this is a test calendar event' && echo "## OK: found the event" ; } || echo "## FAIL: didn't find the event"
+calendar_cli calendar agenda --from-time=2010-10-09 --agenda-days=4 --event-template='{description} {location}'
+echo $output | { grep -q 'this is a test calendar event Москва' && echo "## OK: found the event" ; } || echo "## FAIL: didn't find the event"
echo "## Taking out the agenda for 2010-10-10, with uid"
calendar_cli calendar agenda --from-time=2010-10-10 --agenda-days=1 --event-template='{dtstart} {uid}'