From 1db1108e86ff41a5efc7268145a092fc36418d63 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Tue, 25 Jun 2019 20:38:43 +0200 Subject: Test cases for "Fix monthly and yearly recurrence algorithms" Signed-off-by: Lars Henriksen Signed-off-by: Lukas Fleischer --- test/recur-007.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/recur-007.sh (limited to 'test/recur-007.sh') diff --git a/test/recur-007.sh b/test/recur-007.sh new file mode 100755 index 0000000..73dea6f --- /dev/null +++ b/test/recur-007.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +. "${TEST_INIT:-./test-init.sh}" + +if [ "$1" = 'actual' ]; then + "$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-recur" \ + --startday=12/31/2019 --range=2 --filter-type recur-apt \ + --filter-pattern 'new' + "$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-recur" \ + --startday=4/30/2019 --range=2 --filter-type recur-apt \ + --filter-pattern 'of' +elif [ "$1" = 'expected' ]; then + cat < ..:.. + new year + +01/01/20: + - ..:.. -> 12:00 + new year +04/30/19: + - 12:00 -> ..:.. + change of month + +05/01/19: + - ..:.. -> 11:00 + change of month +EOD +else + ./run-test "$0" +fi -- cgit v1.2.3-54-g00ecf