aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-04-03 20:34:20 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2020-04-05 11:06:53 -0400
commitc3165b8da21303747008d74dd3a686d11029989b (patch)
tree32bdc349caf413cc747662cfca4e9127095b6af6
parent5a3664bf73dab84561bb03db0fe64e275a270093 (diff)
downloadcalcurse-pu.tar.gz
calcurse-pu.zip
Accept empty DESCRIPTION in ical importpu
Adresses GitHub issue #274. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/ical.c5
-rwxr-xr-xtest/ical-009.sh5
2 files changed, 3 insertions, 7 deletions
diff --git a/src/ical.c b/src/ical.c
index f6b9bd9..9aff5b4 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -899,11 +899,6 @@ static char *ical_read_note(char *line, unsigned *noskipped,
ical_log(log, item_type, itemline, _("malformed description."));
(*noskipped)++;
return NULL;
- } else if (strlen(notestr) == 0) {
- mem_free(notestr);
- ical_log(log, item_type, itemline, _("empty description."));
- (*noskipped)++;
- return NULL;
} else {
note = generate_note(notestr);
mem_free(notestr);
diff --git a/test/ical-009.sh b/test/ical-009.sh
index 9558f15..31dc283 100755
--- a/test/ical-009.sh
+++ b/test/ical-009.sh
@@ -10,11 +10,12 @@ if [ "$1" = 'actual' ]; then
echo "$out" | sed -n '4,5p'
log=$(echo "$out" | awk '$1 == "See" {print $2}')
cat "$log" | sed '1,17d'
+ cat $PWD/.calcurse/notes/* | wc
rm -rf .calcurse || exit 1
elif [ "$1" = 'expected' ]; then
cat <<EOD
Import process report: 0068 lines read
-1 app / 0 events / 1 todo / 11 skipped
+2 apps / 0 events / 1 todo / 10 skipped
VEVENT [12]: could not retrieve event start time.
VEVENT [17]: recurrence frequency not recognized.
@@ -24,9 +25,9 @@ VEVENT [32]: malformed exceptions line.
VEVENT [39]: line break in summary.
VEVENT [44]: malformed description line.
VEVENT [50]: malformed description.
-VEVENT [56]: empty description.
VTODO [62]: malformed summary.
VTODO [66]: The ical file seems to be malformed. The end of item was not found.
+ 1 0 1
EOD
else
./run-test "$0"