summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-08-21 11:12:39 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2020-08-26 07:52:08 -0400
commite3cfca7568c0481e30807a41a280752522af2838 (patch)
tree14f63cfef1477f89001e0bbe1eaba62846216a34 /test
parent7b28e38d1307aa6c7bf4350b314dff1dc42b9731 (diff)
downloadcalcurse-e3cfca7568c0481e30807a41a280752522af2838.tar.gz
calcurse-e3cfca7568c0481e30807a41a280752522af2838.zip
Update use of note file for import
Removes the parts of commit 'Extend use of note file for ical import' that relate to STATUS. The STATUS property is (partly) supported for todos already. Corrects insertion of a separator: always insert it before imported properties (also when there is no description). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'test')
-rw-r--r--test/data/ical-005.ical2
-rw-r--r--test/data/ical-009.ical6
-rw-r--r--test/data/ical-012.ical26
-rwxr-xr-xtest/ical-005.sh3
-rwxr-xr-xtest/ical-007.sh1
-rwxr-xr-xtest/ical-009.sh25
-rwxr-xr-xtest/ical-012.sh19
7 files changed, 32 insertions, 50 deletions
diff --git a/test/data/ical-005.ical b/test/data/ical-005.ical
index 5f20f48..e417779 100644
--- a/test/data/ical-005.ical
+++ b/test/data/ical-005.ical
@@ -18,6 +18,6 @@ TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
SUMMARY:On day 2
-DTSTART;VALUE=DATE:20131003
+DTSTART;VALUE=DATE:20131004
END:VEVENT
END:VCALENDAR
diff --git a/test/data/ical-009.ical b/test/data/ical-009.ical
index b5a6575..3495223 100644
--- a/test/data/ical-009.ical
+++ b/test/data/ical-009.ical
@@ -66,12 +66,6 @@ END:VTODO
BEGIN:VEVENT
DTSTART:20200406T221300
DURATION:PT0H15M0S
-SUMMARY:Invalid STATUS
-STATUS:confirmed
-END:VEVENT
-BEGIN:VEVENT
-DTSTART:20200406T221300
-DURATION:PT0H15M0S
SUMMARY:LOCATION twice
LOCATION:first
LOCATION:second
diff --git a/test/data/ical-012.ical b/test/data/ical-012.ical
index 09385fb..05604af 100644
--- a/test/data/ical-012.ical
+++ b/test/data/ical-012.ical
@@ -19,9 +19,8 @@ END:VEVENT
BEGIN:VEVENT
DTSTART:20200404T084100
DURATION:PT1H30M0S
-SUMMARY:No description. Comment and status
+SUMMARY:no description\, but comment
COMMENT:Event without description: a comment\nstreching over\nthree lines
-STATUS:CONFIRMED
END:VEVENT
BEGIN:VEVENT
@@ -42,11 +41,10 @@ END:VEVENT
BEGIN:VEVENT
DTSTART:20200404T204500
DURATION:PT1H30M0S
-SUMMARY:description\, status\, comment and location
-DESCRIPTION:event with\ndescription\nstatus\ncomment\nand location
+SUMMARY:description\, comment and location
+DESCRIPTION:event with\ndescription\ncomment\nand location
LOCATION: Right here
-COMMENT:just a repetition of description:\nevent with\ndescription\nstatus\ncomment\nand location
-STATUS:CANCELLED
+COMMENT:just a repetition of description:\nevent with\ndescription\ncomment\nand location
END:VEVENT
BEGIN:VTODO
@@ -64,9 +62,8 @@ END:VTODO
BEGIN:VTODO
PRIORITY:4
-SUMMARY:Comment and status
-COMMENT:Todo with out description. A comment\nstreching over\nthree lines
-STATUS:NEEDS-ACTION
+SUMMARY:no description\, but comment
+COMMENT:Todo without description. A comment\nstreching over\nthree lines
END:VTODO
BEGIN:VTODO
@@ -77,17 +74,16 @@ END:VTODO
BEGIN:VTODO
PRIORITY:6
-SUMMARY:Empty description\,but status
+SUMMARY:Empty description
DESCRIPTION:
-STATUS:COMPLETED
END:VTODO
BEGIN:VTODO
-SUMMARY:todo with description\, status\, comment and location
-DESCRIPTION:todo with\ndescription\nstatus\ncomment\nand location\,\nbut no priority
+SUMMARY:todo with description\, comment and location
+DESCRIPTION:todo with\ndescription\ncomment\nand location\,\nbut no priority
LOCATION: Right here
-COMMENT:mostly a repetition of description:\ntodo with\ndescription\nstatus\ncomment\nand location
-STATUS:IN-PROCESS
+COMMENT:mostly a repetition of description:\ntodo with\ndescription\ncomment\nand location
+STATUS:COMPLETED
END:VTODO
END:VCALENDAR
diff --git a/test/ical-005.sh b/test/ical-005.sh
index a73b90f..5d38301 100755
--- a/test/ical-005.sh
+++ b/test/ical-005.sh
@@ -16,11 +16,12 @@ Import process report: 0023 lines read
10/03/13:
* All day
* On day 1
- * On day 2
* Two days
10/04/13:
+ * On day 2
* Two days
+--
Import: multi-day event changed to one-day event
EOD
else
diff --git a/test/ical-007.sh b/test/ical-007.sh
index da5002c..59b7bf8 100755
--- a/test/ical-007.sh
+++ b/test/ical-007.sh
@@ -21,6 +21,7 @@ Import process report: 0018 lines read
UTC
- 11:00 -> 12:00
Local time
+--
Import: TZID=CET
EOD
else
diff --git a/test/ical-009.sh b/test/ical-009.sh
index f397044..9015323 100755
--- a/test/ical-009.sh
+++ b/test/ical-009.sh
@@ -17,8 +17,8 @@ if [ "$1" = 'actual' ]; then
rm -rf .calcurse || exit 1
elif [ "$1" = 'expected' ]; then
cat <<EOD
-Import process report: 0127 lines read
-2 apps / 0 events / 1 todo / 20 skipped
+Import process report: 0121 lines read
+2 apps / 0 events / 1 todo / 19 skipped
VEVENT [12]: invalid or malformed event start time.
VEVENT [17]: rrule frequency not supported.
VEVENT [23]: malformed summary line.
@@ -28,17 +28,16 @@ VEVENT [39]: line break in summary.
VEVENT [44]: malformed description line.
VEVENT [50]: malformed description.
VTODO [62]: malformed summary.
-VEVENT [66]: invalid status value.
-VEVENT [72]: only one location allowed.
-VEVENT [79]: invalid duration.
-VEVENT [84]: invalid or malformed event start time.
-VEVENT [89]: invalid end time value type.
-VEVENT [94]: invalid until format.
-VEVENT [100]: invalid exception date value type.
-VEVENT [107]: invalid exception.
-VEVENT [114]: either end or duration.
-VEVENT [120]: end must be later than start.
-VTODO [125]: The ical file seems to be malformed. The end of item was not found.
+VEVENT [66]: only one location allowed.
+VEVENT [73]: invalid duration.
+VEVENT [78]: invalid or malformed event start time.
+VEVENT [83]: invalid end time value type.
+VEVENT [88]: invalid until format.
+VEVENT [94]: invalid exception date value type.
+VEVENT [101]: invalid exception.
+VEVENT [108]: either end or duration.
+VEVENT [114]: end must be later than start.
+VTODO [119]: The ical file seems to be malformed. The end of item was not found.
101
EOD
else
diff --git a/test/ical-012.sh b/test/ical-012.sh
index 9175db9..f4b27df 100755
--- a/test/ical-012.sh
+++ b/test/ical-012.sh
@@ -14,11 +14,10 @@ if [ "$1" = 'actual' ]; then
rm -rf .calcurse || exit 1
elif [ "$1" = 'expected' ]; then
cat <<EOD
-Import process report: 0093 lines read
+Import process report: 0089 lines read
6 apps / 0 events / 6 todos / 0 skipped
todo with
description
-status
comment
and location,
but no priority
@@ -27,13 +26,10 @@ 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
--
@@ -41,18 +37,16 @@ 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
+--
+Comment: Event without description: a comment
streching over
three lines
-Status: NEEDS-ACTION
-Comment: Event without description: a comment
+--
+Comment: Todo without description. A comment
streching over
three lines
-Status: CONFIRMED
event with description
and location
--
@@ -67,9 +61,6 @@ Comment: event with empty description
event with one-line description
todo with one-line description
---
-Status: COMPLETED
-
EOD
else
./run-test "$0"