Diagnose if UNTIL is earlier than start date unless there is a nonconst expr

This commit is contained in:
Dianne Skoll
2022-03-02 09:11:01 -05:00
parent b36c99a34b
commit 0276ce322d
3 changed files with 135 additions and 107 deletions

View File

@@ -323,7 +323,6 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim, int save_in_globals)
DBufFree(&buf);
trig->typ = tok.val;
if (s->isnested) return E_CANT_NEST_RTYPE;
if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday;
if (trig->typ == PASSTHRU_TYPE) {
r = ParseToken(s, &buf);
if (r) return r;
@@ -403,7 +402,6 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim, int save_in_globals)
case T_Empty:
DBufFree(&buf);
if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday;
parsing = 0;
break;
@@ -477,11 +475,22 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim, int save_in_globals)
DBufFree(&buf);
trig->typ = MSG_TYPE;
if (s->isnested) return E_CANT_NEST_RTYPE;
if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday;
parsing = 0;
break;
}
}
if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday;
/* Check for some warning conditions */
if (!s->nonconst_expr) {
if (trig->y != NO_YR && trig->m != NO_MON && trig->d != NO_DAY && trig->until != NO_UNTIL) {
if (Julian(trig->y, trig->m, trig->d) > trig->until) {
Eprint("Warning: UNTIL/THROUGH date earlier than start date");
}
}
}
return OK;
}

View File

@@ -3067,16 +3067,28 @@ msg [$Wednesday]%
$Wednesday => "Wednesday"
Wednesday
# Diagnose until before start date, only for non-constant expressions and
# fully-specified start date
REM Mon 1992 UNTIL 1991-01-01 MSG Not diagnosed - not fully-specified start
../tests/test.rem(529): Expired
REM 1992-01-01 *1 UNTIL 1991-12-31 MSG Diagnosed
../tests/test.rem(530): Warning: UNTIL/THROUGH date earlier than start date
../tests/test.rem(530): Trig = Wednesday, 1 January, 1992
set x '1992-01-01'
REM [x] *1 UNTIL 1991-12-31 MSG Not diagnosed - nonconst expression
x => 1992-01-01
../tests/test.rem(532): Trig = Wednesday, 1 January, 1992
dump $aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Variable Value
$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: Name too long
OMIT 2010-09-03 THROUGH 2010-09-15
OMIT December 25 MSG X
../tests/test.rem(529): Trig = Wednesday, 25 December, 1991
../tests/test.rem(536): Trig = Wednesday, 25 December, 1991
# Next should give a parse error
OMIT 26 Dec 2010 THROUGH 27 Dec 2010 MSG This is not legal
../tests/test.rem(531): Trig = Sunday, 26 December, 2010
../tests/test.rem(538): Trig = Sunday, 26 December, 2010
OMIT DUMP
Global Full OMITs (16 of maximum allowed 1000):
1991-03-11
@@ -3108,287 +3120,287 @@ a => 5761
hebdate(14, "Adar", 1991-02-16, 5761) => 1991-02-28
trigger(1991-02-28) => "28 February 1991"
Leaving UserFN _i() => "28 February 1991"
../tests/test.rem(534): Trig = Thursday, 28 February, 1991
../tests/test.rem(541): Trig = Thursday, 28 February, 1991
# Regression test for bug found by Larry Hynes
REM SATISFY [day(trigdate()-25) == 14] MSG Foo
../tests/test.rem(537): Trig = Saturday, 16 February, 1991
../tests/test.rem(544): Trig = Saturday, 16 February, 1991
trigdate() => 1991-02-16
1991-02-16 - 25 => 1991-01-22
day(1991-01-22) => 22
22 == 14 => 0
../tests/test.rem(537): Trig = Sunday, 17 February, 1991
../tests/test.rem(544): Trig = Sunday, 17 February, 1991
trigdate() => 1991-02-17
1991-02-17 - 25 => 1991-01-23
day(1991-01-23) => 23
23 == 14 => 0
../tests/test.rem(537): Trig = Monday, 18 February, 1991
../tests/test.rem(544): Trig = Monday, 18 February, 1991
trigdate() => 1991-02-18
1991-02-18 - 25 => 1991-01-24
day(1991-01-24) => 24
24 == 14 => 0
../tests/test.rem(537): Trig = Tuesday, 19 February, 1991
../tests/test.rem(544): Trig = Tuesday, 19 February, 1991
trigdate() => 1991-02-19
1991-02-19 - 25 => 1991-01-25
day(1991-01-25) => 25
25 == 14 => 0
../tests/test.rem(537): Trig = Wednesday, 20 February, 1991
../tests/test.rem(544): Trig = Wednesday, 20 February, 1991
trigdate() => 1991-02-20
1991-02-20 - 25 => 1991-01-26
day(1991-01-26) => 26
26 == 14 => 0
../tests/test.rem(537): Trig = Thursday, 21 February, 1991
../tests/test.rem(544): Trig = Thursday, 21 February, 1991
trigdate() => 1991-02-21
1991-02-21 - 25 => 1991-01-27
day(1991-01-27) => 27
27 == 14 => 0
../tests/test.rem(537): Trig = Friday, 22 February, 1991
../tests/test.rem(544): Trig = Friday, 22 February, 1991
trigdate() => 1991-02-22
1991-02-22 - 25 => 1991-01-28
day(1991-01-28) => 28
28 == 14 => 0
../tests/test.rem(537): Trig = Saturday, 23 February, 1991
../tests/test.rem(544): Trig = Saturday, 23 February, 1991
trigdate() => 1991-02-23
1991-02-23 - 25 => 1991-01-29
day(1991-01-29) => 29
29 == 14 => 0
../tests/test.rem(537): Trig = Sunday, 24 February, 1991
../tests/test.rem(544): Trig = Sunday, 24 February, 1991
trigdate() => 1991-02-24
1991-02-24 - 25 => 1991-01-30
day(1991-01-30) => 30
30 == 14 => 0
../tests/test.rem(537): Trig = Monday, 25 February, 1991
../tests/test.rem(544): Trig = Monday, 25 February, 1991
trigdate() => 1991-02-25
1991-02-25 - 25 => 1991-01-31
day(1991-01-31) => 31
31 == 14 => 0
../tests/test.rem(537): Trig = Tuesday, 26 February, 1991
../tests/test.rem(544): Trig = Tuesday, 26 February, 1991
trigdate() => 1991-02-26
1991-02-26 - 25 => 1991-02-01
day(1991-02-01) => 1
1 == 14 => 0
../tests/test.rem(537): Trig = Wednesday, 27 February, 1991
../tests/test.rem(544): Trig = Wednesday, 27 February, 1991
trigdate() => 1991-02-27
1991-02-27 - 25 => 1991-02-02
day(1991-02-02) => 2
2 == 14 => 0
../tests/test.rem(537): Trig = Thursday, 28 February, 1991
../tests/test.rem(544): Trig = Thursday, 28 February, 1991
trigdate() => 1991-02-28
1991-02-28 - 25 => 1991-02-03
day(1991-02-03) => 3
3 == 14 => 0
../tests/test.rem(537): Trig = Friday, 1 March, 1991
../tests/test.rem(544): Trig = Friday, 1 March, 1991
trigdate() => 1991-03-01
1991-03-01 - 25 => 1991-02-04
day(1991-02-04) => 4
4 == 14 => 0
../tests/test.rem(537): Trig = Saturday, 2 March, 1991
../tests/test.rem(544): Trig = Saturday, 2 March, 1991
trigdate() => 1991-03-02
1991-03-02 - 25 => 1991-02-05
day(1991-02-05) => 5
5 == 14 => 0
../tests/test.rem(537): Trig = Sunday, 3 March, 1991
../tests/test.rem(544): Trig = Sunday, 3 March, 1991
trigdate() => 1991-03-03
1991-03-03 - 25 => 1991-02-06
day(1991-02-06) => 6
6 == 14 => 0
../tests/test.rem(537): Trig = Monday, 4 March, 1991
../tests/test.rem(544): Trig = Monday, 4 March, 1991
trigdate() => 1991-03-04
1991-03-04 - 25 => 1991-02-07
day(1991-02-07) => 7
7 == 14 => 0
../tests/test.rem(537): Trig = Tuesday, 5 March, 1991
../tests/test.rem(544): Trig = Tuesday, 5 March, 1991
trigdate() => 1991-03-05
1991-03-05 - 25 => 1991-02-08
day(1991-02-08) => 8
8 == 14 => 0
../tests/test.rem(537): Trig = Wednesday, 6 March, 1991
../tests/test.rem(544): Trig = Wednesday, 6 March, 1991
trigdate() => 1991-03-06
1991-03-06 - 25 => 1991-02-09
day(1991-02-09) => 9
9 == 14 => 0
../tests/test.rem(537): Trig = Thursday, 7 March, 1991
../tests/test.rem(544): Trig = Thursday, 7 March, 1991
trigdate() => 1991-03-07
1991-03-07 - 25 => 1991-02-10
day(1991-02-10) => 10
10 == 14 => 0
../tests/test.rem(537): Trig = Friday, 8 March, 1991
../tests/test.rem(544): Trig = Friday, 8 March, 1991
trigdate() => 1991-03-08
1991-03-08 - 25 => 1991-02-11
day(1991-02-11) => 11
11 == 14 => 0
../tests/test.rem(537): Trig = Saturday, 9 March, 1991
../tests/test.rem(544): Trig = Saturday, 9 March, 1991
trigdate() => 1991-03-09
1991-03-09 - 25 => 1991-02-12
day(1991-02-12) => 12
12 == 14 => 0
../tests/test.rem(537): Trig = Sunday, 10 March, 1991
../tests/test.rem(544): Trig = Sunday, 10 March, 1991
trigdate() => 1991-03-10
1991-03-10 - 25 => 1991-02-13
day(1991-02-13) => 13
13 == 14 => 0
../tests/test.rem(537): Trig = Monday, 11 March, 1991
../tests/test.rem(544): Trig = Monday, 11 March, 1991
trigdate() => 1991-03-11
1991-03-11 - 25 => 1991-02-14
day(1991-02-14) => 14
14 == 14 => 1
../tests/test.rem(537): Trig(satisfied) = Monday, 11 March, 1991
../tests/test.rem(544): Trig(satisfied) = Monday, 11 March, 1991
# Check combo of SATISFY and long-duration events
REM 14 SATISFY [$Tw == 4] MSG Thursday, the 14th
../tests/test.rem(540): Trig = Thursday, 14 March, 1991
../tests/test.rem(547): Trig = Thursday, 14 March, 1991
$Tw => 4
4 == 4 => 1
../tests/test.rem(540): Trig(satisfied) = Thursday, 14 March, 1991
../tests/test.rem(547): Trig(satisfied) = Thursday, 14 March, 1991
REM 14 AT 16:00 DURATION 8:00 SATISFY [$Tw == 4] MSG Thursday, the 14th
../tests/test.rem(541): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 08:00
../tests/test.rem(548): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 08:00
$Tw => 4
4 == 4 => 1
../tests/test.rem(541): Trig(satisfied) = Thursday, 14 March, 1991 AT 16:00 DURATION 08:00
../tests/test.rem(548): Trig(satisfied) = Thursday, 14 March, 1991 AT 16:00 DURATION 08:00
REM 14 AT 16:00 DURATION 8:01 SATISFY [$Tw == 4] MSG Thursday, the 14th
../tests/test.rem(542): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 08:01
../tests/test.rem(542): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 08:01
../tests/test.rem(549): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 08:01
../tests/test.rem(549): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 08:01
$Tw => 4
4 == 4 => 1
../tests/test.rem(542): Trig(satisfied) = Thursday, 14 March, 1991 AT 16:00 DURATION 08:01
../tests/test.rem(549): Trig(satisfied) = Thursday, 14 March, 1991 AT 16:00 DURATION 08:01
REM 14 AT 16:00 DURATION 32:00 SATISFY [$Tw == 4] MSG Thursday, the 14th
../tests/test.rem(543): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 32:00
../tests/test.rem(543): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 32:00
../tests/test.rem(550): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 32:00
../tests/test.rem(550): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 32:00
$Tw => 4
4 == 4 => 1
../tests/test.rem(543): Trig(satisfied) = Thursday, 14 March, 1991 AT 16:00 DURATION 32:00
../tests/test.rem(550): Trig(satisfied) = Thursday, 14 March, 1991 AT 16:00 DURATION 32:00
REM 14 AT 16:00 DURATION 32:01 SATISFY [$Tw == 4] MSG Thursday, the 14th
../tests/test.rem(544): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 32:01
../tests/test.rem(544): Trig = Thursday, 14 February, 1991 AT 16:00 DURATION 32:01
../tests/test.rem(551): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 32:01
../tests/test.rem(551): Trig = Thursday, 14 February, 1991 AT 16:00 DURATION 32:01
$Tw => 4
4 == 4 => 1
../tests/test.rem(544): Trig(adj) = Saturday, 16 February, 1991 AT 00:00 DURATION 00:01
../tests/test.rem(544): Trig(satisfied) = Saturday, 16 February, 1991 AT 00:00 DURATION 00:01
../tests/test.rem(551): Trig(adj) = Saturday, 16 February, 1991 AT 00:00 DURATION 00:01
../tests/test.rem(551): Trig(satisfied) = Saturday, 16 February, 1991 AT 00:00 DURATION 00:01
Thursday, the 14th
REM 14 AT 16:00 DURATION 40:00 SATISFY [$Tw == 4] MSG Thursday, the 14th
../tests/test.rem(545): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 40:00
../tests/test.rem(545): Trig = Thursday, 14 February, 1991 AT 16:00 DURATION 40:00
../tests/test.rem(552): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 40:00
../tests/test.rem(552): Trig = Thursday, 14 February, 1991 AT 16:00 DURATION 40:00
$Tw => 4
4 == 4 => 1
../tests/test.rem(545): Trig(adj) = Saturday, 16 February, 1991 AT 00:00 DURATION 08:00
../tests/test.rem(545): Trig(satisfied) = Saturday, 16 February, 1991 AT 00:00 DURATION 08:00
../tests/test.rem(552): Trig(adj) = Saturday, 16 February, 1991 AT 00:00 DURATION 08:00
../tests/test.rem(552): Trig(satisfied) = Saturday, 16 February, 1991 AT 00:00 DURATION 08:00
Thursday, the 14th
# This is now an error
REM DURATION 15:00 MSG Should fail... need AT if you have DURATION.
../tests/test.rem(548): Cannot specify DURATION without specifying AT
../tests/test.rem(555): Cannot specify DURATION without specifying AT
# Parsing of AM/PM times
REM AT 0:00am MSG foo 0a
../tests/test.rem(551): Expecting time after AT
../tests/test.rem(558): Expecting time after AT
REM AT 1:00AM MSG foo 1a
../tests/test.rem(552): Trig = Saturday, 16 February, 1991 AT 01:00
../tests/test.rem(559): Trig = Saturday, 16 February, 1991 AT 01:00
foo 1a
REM AT 2:00am MSG foo 2a
../tests/test.rem(553): Trig = Saturday, 16 February, 1991 AT 02:00
../tests/test.rem(560): Trig = Saturday, 16 February, 1991 AT 02:00
foo 2a
REM AT 3:00AM MSG foo 3a
../tests/test.rem(554): Trig = Saturday, 16 February, 1991 AT 03:00
../tests/test.rem(561): Trig = Saturday, 16 February, 1991 AT 03:00
foo 3a
REM AT 4:00am MSG foo 4a
../tests/test.rem(555): Trig = Saturday, 16 February, 1991 AT 04:00
../tests/test.rem(562): Trig = Saturday, 16 February, 1991 AT 04:00
foo 4a
REM AT 5:00AM MSG foo 5a
../tests/test.rem(556): Trig = Saturday, 16 February, 1991 AT 05:00
../tests/test.rem(563): Trig = Saturday, 16 February, 1991 AT 05:00
foo 5a
REM AT 6:00am MSG foo 6a
../tests/test.rem(557): Trig = Saturday, 16 February, 1991 AT 06:00
../tests/test.rem(564): Trig = Saturday, 16 February, 1991 AT 06:00
foo 6a
REM AT 7:00AM MSG foo 7a
../tests/test.rem(558): Trig = Saturday, 16 February, 1991 AT 07:00
../tests/test.rem(565): Trig = Saturday, 16 February, 1991 AT 07:00
foo 7a
REM AT 8:00am MSG foo 8a
../tests/test.rem(559): Trig = Saturday, 16 February, 1991 AT 08:00
../tests/test.rem(566): Trig = Saturday, 16 February, 1991 AT 08:00
foo 8a
REM AT 9:00AM MSG foo 9a
../tests/test.rem(560): Trig = Saturday, 16 February, 1991 AT 09:00
../tests/test.rem(567): Trig = Saturday, 16 February, 1991 AT 09:00
foo 9a
REM AT 10:00am MSG foo 10a
../tests/test.rem(561): Trig = Saturday, 16 February, 1991 AT 10:00
../tests/test.rem(568): Trig = Saturday, 16 February, 1991 AT 10:00
foo 10a
REM AT 11:00AM MSG foo 11a
../tests/test.rem(562): Trig = Saturday, 16 February, 1991 AT 11:00
../tests/test.rem(569): Trig = Saturday, 16 February, 1991 AT 11:00
foo 11a
REM AT 12:00am MSG foo 12a
../tests/test.rem(563): Trig = Saturday, 16 February, 1991 AT 00:00
../tests/test.rem(570): Trig = Saturday, 16 February, 1991 AT 00:00
foo 12a
REM AT 13:00AM MSG foo 13a
../tests/test.rem(564): Expecting time after AT
../tests/test.rem(571): Expecting time after AT
REM AT 0:00pm MSG foo 0p
../tests/test.rem(565): Expecting time after AT
../tests/test.rem(572): Expecting time after AT
REM AT 1:00PM MSG foo 1p
../tests/test.rem(566): Trig = Saturday, 16 February, 1991 AT 13:00
../tests/test.rem(573): Trig = Saturday, 16 February, 1991 AT 13:00
foo 1p
REM AT 2:00pm MSG foo 2p
../tests/test.rem(567): Trig = Saturday, 16 February, 1991 AT 14:00
../tests/test.rem(574): Trig = Saturday, 16 February, 1991 AT 14:00
foo 2p
REM AT 3:00PM MSG foo 3p
../tests/test.rem(568): Trig = Saturday, 16 February, 1991 AT 15:00
../tests/test.rem(575): Trig = Saturday, 16 February, 1991 AT 15:00
foo 3p
REM AT 4:00pm MSG foo 4p
../tests/test.rem(569): Trig = Saturday, 16 February, 1991 AT 16:00
../tests/test.rem(576): Trig = Saturday, 16 February, 1991 AT 16:00
foo 4p
REM AT 5:00PM MSG foo 5p
../tests/test.rem(570): Trig = Saturday, 16 February, 1991 AT 17:00
../tests/test.rem(577): Trig = Saturday, 16 February, 1991 AT 17:00
foo 5p
REM AT 6:00pm MSG foo 6p
../tests/test.rem(571): Trig = Saturday, 16 February, 1991 AT 18:00
../tests/test.rem(578): Trig = Saturday, 16 February, 1991 AT 18:00
foo 6p
REM AT 7:00PM MSG foo 7p
../tests/test.rem(572): Trig = Saturday, 16 February, 1991 AT 19:00
../tests/test.rem(579): Trig = Saturday, 16 February, 1991 AT 19:00
foo 7p
REM AT 8:00pm MSG foo 8p
../tests/test.rem(573): Trig = Saturday, 16 February, 1991 AT 20:00
../tests/test.rem(580): Trig = Saturday, 16 February, 1991 AT 20:00
foo 8p
REM AT 9:00PM MSG foo 9p
../tests/test.rem(574): Trig = Saturday, 16 February, 1991 AT 21:00
../tests/test.rem(581): Trig = Saturday, 16 February, 1991 AT 21:00
foo 9p
REM AT 10:00pm MSG foo 10p
../tests/test.rem(575): Trig = Saturday, 16 February, 1991 AT 22:00
../tests/test.rem(582): Trig = Saturday, 16 February, 1991 AT 22:00
foo 10p
REM AT 11:00PM MSG foo 11p
../tests/test.rem(576): Trig = Saturday, 16 February, 1991 AT 23:00
../tests/test.rem(583): Trig = Saturday, 16 February, 1991 AT 23:00
foo 11p
REM AT 12:00pm MSG foo 12p
../tests/test.rem(577): Trig = Saturday, 16 February, 1991 AT 12:00
../tests/test.rem(584): Trig = Saturday, 16 February, 1991 AT 12:00
foo 12p
REM AT 13:00PM MSG foo 13p
../tests/test.rem(578): Expecting time after AT
../tests/test.rem(585): Expecting time after AT
DEBUG +x
SET x 0:00am + 0
../tests/test.rem(581): Ill-formed time
../tests/test.rem(588): Ill-formed time
SET x 1:00AM + 0
01:00 + 0 => 01:00
SET x 2:00am + 0
@@ -3414,10 +3426,10 @@ SET x 11:00AM + 0
SET x 12:00am + 0
00:00 + 0 => 00:00
SET x 13:00AM + 0
../tests/test.rem(594): Ill-formed time
../tests/test.rem(601): Ill-formed time
SET x 0:00pm + 0
../tests/test.rem(596): Ill-formed time
../tests/test.rem(603): Ill-formed time
SET x 1:00PM + 0
13:00 + 0 => 13:00
SET x 2:00pm + 0
@@ -3443,10 +3455,10 @@ SET x 11:00PM + 0
SET x 12:00pm + 0
12:00 + 0 => 12:00
SET x 13:00PM + 0
../tests/test.rem(609): Ill-formed time
../tests/test.rem(616): Ill-formed time
SET x '2015-02-03@0:00am' + 0
../tests/test.rem(611): Ill-formed time
../tests/test.rem(618): Ill-formed time
SET x '2015-02-03@1:00AM' + 0
2015-02-03@01:00 + 0 => 2015-02-03@01:00
SET x '2015-02-03@2:00am' + 0
@@ -3472,10 +3484,10 @@ SET x '2015-02-03@11:00AM' + 0
SET x '2015-02-03@12:00am' + 0
2015-02-03@00:00 + 0 => 2015-02-03@00:00
SET x '2015-02-03@13:00AM' + 0
../tests/test.rem(624): Ill-formed time
../tests/test.rem(631): Ill-formed time
SET x '2015-02-03@0:00pm' + 0
../tests/test.rem(626): Ill-formed time
../tests/test.rem(633): Ill-formed time
SET x '2015-02-03@1:00PM' + 0
2015-02-03@13:00 + 0 => 2015-02-03@13:00
SET x '2015-02-03@2:00pm' + 0
@@ -3501,7 +3513,7 @@ SET x '2015-02-03@11:00PM' + 0
SET x '2015-02-03@12:00pm' + 0
2015-02-03@12:00 + 0 => 2015-02-03@12:00
SET x '2015-02-03@13:00PM' + 0
../tests/test.rem(639): Ill-formed time
../tests/test.rem(646): Ill-formed time
# Test the ampm function
set x ampm(0:12) + ""
@@ -3597,88 +3609,88 @@ coerce("DATETIME", "2020-05-05@1:45pm") => 2020-05-05@13:45
set a $IntMin - 1
$IntMin => -2147483648
-2147483648 - 1 => Number too high
../tests/test.rem(678): `-': Number too high
../tests/test.rem(685): `-': Number too high
set a $IntMin - $IntMax
$IntMin => -2147483648
$IntMax => 2147483647
-2147483648 - 2147483647 => Number too high
../tests/test.rem(679): `-': Number too high
../tests/test.rem(686): `-': Number too high
set a $IntMax - $IntMin
$IntMax => 2147483647
$IntMin => -2147483648
2147483647 - -2147483648 => Number too high
../tests/test.rem(680): `-': Number too high
../tests/test.rem(687): `-': Number too high
set a $IntMax - (-1)
$IntMax => 2147483647
- 1 => -1
2147483647 - -1 => Number too high
../tests/test.rem(681): `-': Number too high
../tests/test.rem(688): `-': Number too high
set a $IntMax + 1
$IntMax => 2147483647
2147483647 + 1 => Number too high
../tests/test.rem(682): `+': Number too high
../tests/test.rem(689): `+': Number too high
set a $IntMax + $IntMax
$IntMax => 2147483647
$IntMax => 2147483647
2147483647 + 2147483647 => Number too high
../tests/test.rem(683): `+': Number too high
../tests/test.rem(690): `+': Number too high
set a $IntMin + (-1)
$IntMin => -2147483648
- 1 => -1
-2147483648 + -1 => Number too high
../tests/test.rem(684): `+': Number too high
../tests/test.rem(691): `+': Number too high
set a $IntMin + $IntMin
$IntMin => -2147483648
$IntMin => -2147483648
-2147483648 + -2147483648 => Number too high
../tests/test.rem(685): `+': Number too high
../tests/test.rem(692): `+': Number too high
set a $IntMax * 2
$IntMax => 2147483647
2147483647 * 2 => Number too high
../tests/test.rem(686): `*': Number too high
../tests/test.rem(693): `*': Number too high
set a $IntMax * $IntMax
$IntMax => 2147483647
$IntMax => 2147483647
2147483647 * 2147483647 => Number too high
../tests/test.rem(687): `*': Number too high
../tests/test.rem(694): `*': Number too high
set a $IntMax * $IntMin
$IntMax => 2147483647
$IntMin => -2147483648
2147483647 * -2147483648 => Number too high
../tests/test.rem(688): `*': Number too high
../tests/test.rem(695): `*': Number too high
set a $IntMin * 2
$IntMin => -2147483648
-2147483648 * 2 => Number too high
../tests/test.rem(689): `*': Number too high
../tests/test.rem(696): `*': Number too high
set a $IntMin * $IntMin
$IntMin => -2147483648
$IntMin => -2147483648
-2147483648 * -2147483648 => Number too high
../tests/test.rem(690): `*': Number too high
../tests/test.rem(697): `*': Number too high
set a $IntMin * $IntMax
$IntMin => -2147483648
$IntMax => 2147483647
-2147483648 * 2147483647 => Number too high
../tests/test.rem(691): `*': Number too high
../tests/test.rem(698): `*': Number too high
set a $IntMin / (-1)
$IntMin => -2147483648
- 1 => -1
-2147483648 / -1 => Number too high
../tests/test.rem(692): `/': Number too high
../tests/test.rem(699): `/': Number too high
set a $IntMin * (-1)
$IntMin => -2147483648
- 1 => -1
-2147483648 * -1 => Number too high
../tests/test.rem(693): `*': Number too high
../tests/test.rem(700): `*': Number too high
set a (-1) * $IntMin
- 1 => -1
$IntMin => -2147483648
-1 * -2147483648 => Number too high
../tests/test.rem(694): `*': Number too high
../tests/test.rem(701): `*': Number too high
set a abs($IntMin)
$IntMin => -2147483648
abs(-2147483648) => Number too high
../tests/test.rem(695): Number too high
../tests/test.rem(702): Number too high
# The "isany" function
set a isany(1)
@@ -3705,17 +3717,17 @@ set a shellescape(" !\"#$%%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ
shellescape(" !"#$%%&'()*+,-./0123456789:;<=>?@ABCDEF"...) => "\ \!\"\#\$\%\%\&\'\(\)\*+,-./0123456789\"...
msg [a]
../tests/test.rem(711): Trig = Saturday, 16 February, 1991
../tests/test.rem(718): Trig = Saturday, 16 February, 1991
a => "\ \!\"\#\$\%\%\&\'\(\)\*+,-./0123456789\"...
\ \!\"\#\$\\\&\'\(\)\*+,-./0123456789\:\;\<=\>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_\`abcdefghijklmnopqrstuvwxyz\{\|\}\~
# Deprecated functions
set x psshade(50)
psshade(50) => ../tests/test.rem(714): psshade() is deprecated; use SPECIAL SHADE instead.
psshade(50) => ../tests/test.rem(721): psshade() is deprecated; use SPECIAL SHADE instead.
"/_A LineWidth 2 div def _A _A moveto Box"...
set x psmoon(0)
psmoon(0) => ../tests/test.rem(715): psmoon() is deprecated; use SPECIAL MOON instead.
psmoon(0) => ../tests/test.rem(722): psmoon() is deprecated; use SPECIAL MOON instead.
"gsave 0 setgray newpath Border DaySize 2"...
# Don't want Remind to queue reminders

View File

@@ -524,6 +524,13 @@ msg [$Uw]%
msg [$Uy]%
msg [$Wednesday]%
# Diagnose until before start date, only for non-constant expressions and
# fully-specified start date
REM Mon 1992 UNTIL 1991-01-01 MSG Not diagnosed - not fully-specified start
REM 1992-01-01 *1 UNTIL 1991-12-31 MSG Diagnosed
set x '1992-01-01'
REM [x] *1 UNTIL 1991-12-31 MSG Not diagnosed - nonconst expression
dump $aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
OMIT 2010-09-03 THROUGH 2010-09-15
OMIT December 25 MSG X