From 467815d465195ac7fe05449e074963585c4eaf9f Mon Sep 17 00:00:00 2001
From: Lars Henriksen <LarsHenriksen@get2net.dk>
Date: Tue, 10 Mar 2020 00:12:50 +0100
Subject: Improve ical import logging

The log file is not deleted if items were skipped (adresses Github issue #269).
The log file includes the import file name and time.
The import line numbers have been corrected (and tests amended).

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
---
 test/ical-001.sh | 2 +-
 test/ical-002.sh | 2 +-
 test/ical-003.sh | 2 +-
 test/ical-004.sh | 2 +-
 test/ical-005.sh | 2 +-
 test/ical-006.sh | 2 +-
 test/ical-007.sh | 2 +-
 test/ical-008.sh | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

(limited to 'test')

diff --git a/test/ical-001.sh b/test/ical-001.sh
index ff5b9ce..4ff1bfe 100755
--- a/test/ical-001.sh
+++ b/test/ical-001.sh
@@ -11,7 +11,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0017 lines read
+Import process report: 0012 lines read
 1 app / 0 events / 1 todo / 0 skipped
 01/01/80:
  - 00:01 -> ..:..
diff --git a/test/ical-002.sh b/test/ical-002.sh
index 81ed1f1..0b74b19 100755
--- a/test/ical-002.sh
+++ b/test/ical-002.sh
@@ -10,7 +10,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0036 lines read
+Import process report: 0028 lines read
 5 apps / 0 events / 0 todos / 0 skipped
 01/01/00:
  - 00:00 -> 00:00
diff --git a/test/ical-003.sh b/test/ical-003.sh
index 244a6d5..a0734ce 100755
--- a/test/ical-003.sh
+++ b/test/ical-003.sh
@@ -10,7 +10,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0031 lines read
+Import process report: 0025 lines read
 3 apps / 0 events / 0 todos / 0 skipped
 01/01/00:
  - 00:00 -> 01:30
diff --git a/test/ical-004.sh b/test/ical-004.sh
index 1819791..7be6d1c 100755
--- a/test/ical-004.sh
+++ b/test/ical-004.sh
@@ -11,7 +11,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0017 lines read
+Import process report: 0012 lines read
 1 app / 0 events / 1 todo / 0 skipped
 01/01/80:
  - 00:01 -> ..:..
diff --git a/test/ical-005.sh b/test/ical-005.sh
index 5e9796b..f23fe65 100755
--- a/test/ical-005.sh
+++ b/test/ical-005.sh
@@ -10,7 +10,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0030 lines read
+Import process report: 0023 lines read
 0 apps / 4 events / 0 todos / 0 skipped
 10/03/13:
  * All day
diff --git a/test/ical-006.sh b/test/ical-006.sh
index 1d9359a..6899d42 100755
--- a/test/ical-006.sh
+++ b/test/ical-006.sh
@@ -10,7 +10,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0078 lines read
+Import process report: 0063 lines read
 12 apps / 0 events / 0 todos / 0 skipped
 06/01/12:
  - 15:00 -> 15:30
diff --git a/test/ical-007.sh b/test/ical-007.sh
index 4c43a4e..0a5ad2a 100755
--- a/test/ical-007.sh
+++ b/test/ical-007.sh
@@ -11,7 +11,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0018 lines read
+Import process report: 0013 lines read
 2 apps / 0 events / 0 todos / 0 skipped
 02/23/15:
  - 06:00 -> 07:00
diff --git a/test/ical-008.sh b/test/ical-008.sh
index bc59e56..b659eb0 100755
--- a/test/ical-008.sh
+++ b/test/ical-008.sh
@@ -11,7 +11,7 @@ if [ "$1" = 'actual' ]; then
   rm -rf .calcurse || exit 1
 elif [ "$1" = 'expected' ]; then
   cat <<EOD
-Import process report: 0017 lines read
+Import process report: 0012 lines read
 1 app / 0 events / 1 todo / 0 skipped
 01/01/80:
  - 00:01 -> ..:..
-- 
cgit v1.2.3-70-g09d2