aboutsummaryrefslogtreecommitdiffstats
path: root/test/ical-010.sh
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-03-22 07:50:59 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2020-03-22 13:45:40 -0400
commite535eff9040eac07ca43c9db28aa2fd1a61f3b48 (patch)
tree3108719707027a798d229c6754ce66c9312e5fa6 /test/ical-010.sh
parentffbf714c9e6665c13d9ce5d5a2feac812377a7c0 (diff)
downloadcalcurse-e535eff9040eac07ca43c9db28aa2fd1a61f3b48.tar.gz
calcurse-e535eff9040eac07ca43c9db28aa2fd1a61f3b48.zip
Extend iCalendar import tests
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>
Diffstat (limited to 'test/ical-010.sh')
-rwxr-xr-xtest/ical-010.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/ical-010.sh b/test/ical-010.sh
new file mode 100755
index 0000000..7cb1002
--- /dev/null
+++ b/test/ical-010.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# ical export: encoded summary TEXT (escaped characters).
+
+. "${TEST_INIT:-./test-init.sh}"
+
+if [ "$1" = 'actual' ]; then
+ mkdir .calcurse || exit 1
+ cp "$DATA_DIR/conf" .calcurse || exit 1
+ cp "$DATA_DIR/apts-export" .calcurse/apts || exit 1
+ cp "$DATA_DIR/todo-export" .calcurse/todo || exit 1
+ "$CALCURSE" -D "$PWD/.calcurse" --export=ical | sed '/^PRODID/d'
+ rm -rf .calcurse || exit 1
+elif [ "$1" = 'expected' ]; then
+ cat <<EOD
+BEGIN:VCALENDAR
+VERSION:2.0
+BEGIN:VEVENT
+DTSTART;VALUE=DATE:20200226
+SUMMARY:Exported\, escaped characters in SUMMARY: \,(comma)\, \;(semicolon) \, and \\\\(escape).
+END:VEVENT
+BEGIN:VEVENT
+DTSTART:20200226T070900
+DURATION:P0DT0H1M0S
+SUMMARY:Exported\, escaped characters in SUMMARY: \,(comma)\, \;(semicolon) \, and \\\\(escape).
+END:VEVENT
+BEGIN:VTODO
+PRIORITY:1
+SUMMARY:Exported\, escaped characters in SUMMARY: \,(comma)\, \;(semicolon) \, and \\\\(escape).
+END:VTODO
+END:VCALENDAR
+EOD
+else
+ ./run-test "$0"
+fi