summaryrefslogtreecommitdiffstats
path: root/test/recur-007.sh
blob: 73dea6f5e23179817dcb058b26830048b4a08280 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 <<EOD
12/31/19:
 - 12:00 -> ..:..
	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