diff --git a/src/main.c b/src/main.c index 47d01b5c..fc99dc3f 100644 --- a/src/main.c +++ b/src/main.c @@ -176,6 +176,8 @@ static void DoReminders(void) Parser p; int purge_handled; + DidMsgReminder = 0; + if (!UseStdin) { FileAccessDate = GetAccessDate(InitialFile); } else { diff --git a/tests/test-rem b/tests/test-rem index 8032dc9a..a1656d5f 100644 --- a/tests/test-rem +++ b/tests/test-rem @@ -398,6 +398,9 @@ EOF TZ=America/Toronto ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1 TZ=Europe/Berlin ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1 +# Test that banner is printed on every iteration +echo "MSG Should be three banners." | ../src/remind - '*3' >> ../tests/test.out 2>&1 + # Remove references to SysInclude, which is build-specific grep -F -v '$SysInclude' < ../tests/test.out > ../tests/test.out.1 && mv -f ../tests/test.out.1 ../tests/test.out cmp -s ../tests/test.out ../tests/test.cmp diff --git a/tests/test.cmp b/tests/test.cmp index 071f2b1c..d92990f3 100644 --- a/tests/test.cmp +++ b/tests/test.cmp @@ -10446,3 +10446,15 @@ set c timezone('2022-12-01') timezone(2022-12-01) => "CET" No reminders. +Reminders for Thursday, 20th October, 2022 (today): + +Should be three banners. + +Reminders for Friday, 21st October, 2022: + +Should be three banners. + +Reminders for Saturday, 22nd October, 2022: + +Should be three banners. +