mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Make a local OMIT that doesn't specify a weekday name into a syntax error.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user