diff --git a/src/dorem.c b/src/dorem.c index ac4aea80..a3bf73aa 100644 --- a/src/dorem.c +++ b/src/dorem.c @@ -680,7 +680,7 @@ static int ParseLocalOmit(ParsePtr s, Trigger *t) default: if (t->localomit == NO_WD) { - Wprint("Warning: OMIT clause used in REM command, but no weekdays omitted"); + return E_EXPECTING_WEEKDAY; } PushToken(DBufValue(&buf), s); DBufFree(&buf); diff --git a/src/err.h b/src/err.h index 7bb46082..a0388bc6 100644 --- a/src/err.h +++ b/src/err.h @@ -121,6 +121,8 @@ #define E_STRING_TOO_LONG 101 #define E_TIME_TWICE 102 #define E_DURATION_NO_AT 103 +#define E_EXPECTING_WEEKDAY 104 + #ifdef MK_GLOBALS #undef EXTERN #define EXTERN @@ -241,7 +243,8 @@ EXTERN char *ErrMsg[] "No files matching *.rem", "String too long", "Time specified twice", - "Cannot specify DURATION without specifying AT" + "Cannot specify DURATION without specifying AT", + "Expecting weekday name" } #endif /* MK_GLOBALS */ ; diff --git a/src/langs/finnish.h b/src/langs/finnish.h index afe24c62..b3b08c94 100644 --- a/src/langs/finnish.h +++ b/src/langs/finnish.h @@ -245,7 +245,8 @@ EXTERN char *ErrMsg[] = "No files matching *.rem", "String too long", "Time specified twice", - "Cannot specify DURATION without specifying AT" + "Cannot specify DURATION without specifying AT". + "Odotettu viikonpäivän nimi" }; #endif /* MK_GLOBALS */ diff --git a/src/langs/french.h b/src/langs/french.h index db9334e7..51ff06bf 100644 --- a/src/langs/french.h +++ b/src/langs/french.h @@ -219,7 +219,8 @@ EXTERN char *ErrMsg[] = "No files matching *.rem", "String too long", "Time specified twice", - "Cannot specify DURATION without specifying AT" + "Cannot specify DURATION without specifying AT", + "Nom du jour de la semaine attendu", }; #endif /* MK_GLOBALS */ diff --git a/src/langs/polish.h b/src/langs/polish.h index f2fe82c1..58987456 100644 --- a/src/langs/polish.h +++ b/src/langs/polish.h @@ -235,7 +235,8 @@ EXTERN char *ErrMsg[] = "No files matching *.rem", "String too long", "Time specified twice", - "Cannot specify DURATION without specifying AT" + "Cannot specify DURATION without specifying AT", + "Oczekiwana nazwa dnia tygodnia" }; #endif /* MK_GLOBALS */ diff --git a/src/langs/portbr.h b/src/langs/portbr.h index 0e03d592..ce2efa8b 100644 --- a/src/langs/portbr.h +++ b/src/langs/portbr.h @@ -244,7 +244,8 @@ EXTERN char *ErrMsg[] = "No files matching *.rem", "String too long", "Time specified twice", - "Cannot specify DURATION without specifying AT" + "Cannot specify DURATION without specifying AT", + "Esperando nome do dia da semana", }; #endif /* MK_GLOBALS */ diff --git a/tests/test.cmp b/tests/test.cmp index 3159e1cb..dfa8e003 100644 --- a/tests/test.cmp +++ b/tests/test.cmp @@ -4880,6 +4880,14 @@ set pqxya 1+2) 1 + 2 => 3 ../tests/test.rem(911): Expecting end-of-line +# Should result in an error +REM Tue OMIT 2024-01-01 MSG Wookie +../tests/test.rem(914): Expecting weekday name + +# No error +REM Tue OMIT Wed 2024-01-01 MSG Blort +../tests/test.rem(917): Trig = Tuesday, 2 January, 2024 + # Don't want Remind to queue reminders EXIT diff --git a/tests/test.rem b/tests/test.rem index a0047bcd..80ab8215 100644 --- a/tests/test.rem +++ b/tests/test.rem @@ -910,6 +910,12 @@ set a 7 * "Cabbage! " # Should result in errors set pqxya 1+2) +# Should result in an error +REM Tue OMIT 2024-01-01 MSG Wookie + +# No error +REM Tue OMIT Wed 2024-01-01 MSG Blort + # Don't want Remind to queue reminders EXIT