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>
This commit is contained in:
Lars Henriksen
2020-03-22 07:50:59 +01:00
committed by Lukas Fleischer
parent ffbf714c9e
commit e535eff904
7 changed files with 165 additions and 1 deletions

20
test/ical-011.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
# encoded summary TEXT (escaped charaters): export, then import and compare.
. "${TEST_INIT:-./test-init.sh}"
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 > "$PWD"/.calcurse/export.ical &&
(cd .calcurse; mv apts apts-export; mv todo todo-export) &&
"$CALCURSE" -D "$PWD/.calcurse" --quiet --import \
"$PWD"/.calcurse/export.ical &&
(cd .calcurse; cmp -s apts-export apts) &&
(cd .calcurse; cmp -s todo-export todo) &&
status=0 || status=1
rm -rf .calcurse
exit $status