aboutsummaryrefslogtreecommitdiffstats
path: root/test/ical-012.sh
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-04-07 21:29:26 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2020-04-28 07:32:44 -0400
commite9deb6fff3d56b166ab702828bd1a716c2bf567f (patch)
treead3baec13de756042417321724adff2df8b6f545 /test/ical-012.sh
parent214a761564e75abef1740738460288102a571a9b (diff)
downloadcalcurse-e9deb6fff3d56b166ab702828bd1a716c2bf567f.tar.gz
calcurse-e9deb6fff3d56b166ab702828bd1a716c2bf567f.zip
Extend use of note file for iCal import
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>
Diffstat (limited to 'test/ical-012.sh')
-rwxr-xr-xtest/ical-012.sh76
1 files changed, 76 insertions, 0 deletions
diff --git a/test/ical-012.sh b/test/ical-012.sh
new file mode 100755
index 0000000..9175db9
--- /dev/null
+++ b/test/ical-012.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+# Note file creation. Eleven note files are created for 6 apps and 6 todos.
+# To produce a fixed, predictable directory listing it is necessary that the
+# notes are of different sizes (except for the vevent and vtodo empty note which
+# is shared).
+
+. "${TEST_INIT:-./test-init.sh}"
+
+if [ "$1" = 'actual' ]; then
+ mkdir .calcurse &&
+ cp "$DATA_DIR/conf" .calcurse || exit 1
+ "$CALCURSE" -D "$PWD/.calcurse" -i "$DATA_DIR/ical-012.ical"
+ (cd "$PWD/.calcurse/notes/"; cat $(ls -S1))
+ rm -rf .calcurse || exit 1
+elif [ "$1" = 'expected' ]; then
+ cat <<EOD
+Import process report: 0093 lines read
+6 apps / 0 events / 6 todos / 0 skipped
+todo with
+description
+status
+comment
+and location,
+but no priority
+--
+Location: Right here
+Comment: mostly a repetition of description:
+ todo with
+ description
+ status
+ comment
+ and location
+Status: IN-PROCESS
+event with
+description
+status
+comment
+and location
+--
+Location: Right here
+Comment: just a repetition of description:
+ event with
+ description
+ status
+ comment
+ and location
+Status: CANCELLED
+Comment: Todo with out description. A comment
+ streching over
+ three lines
+Status: NEEDS-ACTION
+Comment: Event without description: a comment
+ streching over
+ three lines
+Status: CONFIRMED
+event with description
+and location
+--
+Location: Right here
+todo with description
+and location
+--
+Location: Right here
+
+--
+Comment: event with empty description
+event with one-line description
+todo with one-line description
+
+--
+Status: COMPLETED
+
+EOD
+else
+ ./run-test "$0"
+fi