Make sure we print the banner on each iteration of a command-line '*rep'

This commit is contained in:
Dianne Skoll
2022-10-20 18:21:57 -04:00
parent 2afe95d090
commit f3d969f658
3 changed files with 17 additions and 0 deletions

View File

@@ -176,6 +176,8 @@ static void DoReminders(void)
Parser p;
int purge_handled;
DidMsgReminder = 0;
if (!UseStdin) {
FileAccessDate = GetAccessDate(InitialFile);
} else {

View File

@@ -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

View File

@@ -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.