Compare commits

...

19 Commits

Author SHA1 Message Date
Dianne Skoll
fdc3e4d23d Update WHATSNEW 2022-09-22 15:00:30 -04:00
Dianne Skoll
f179c837e1 Update regression tests. 2022-09-22 08:56:58 -04:00
Dianne Skoll
740bb44956 Don't consider IFTRIG true if we could not compute a trigger date.
Bug noted by Gunther Reißig
2022-09-22 08:48:19 -04:00
Dianne Skoll
5b953769fe Obey $DefaultColor in a SATISFY-type reminder.
Bug found by Gunther Reißig.
2022-09-22 08:37:37 -04:00
Dianne Skoll
1ae00ce778 No need to reset NumTriggered. 2022-09-21 19:11:30 -04:00
Dianne Skoll
a01e05c1db Fix bug introduced in commit 98c5bf511e:
Don't print a banner when issuing a queued reminder.
2022-09-21 18:17:25 -04:00
Dianne Skoll
63fb3e99f3 Make "test" depend on "all" rather than just "remind" 2022-09-19 13:56:11 -04:00
Dianne Skoll
6cf7f5d2d8 Merge branch 'add_ci' into 'master'
Add ci

See merge request dskoll/remind!2
2022-09-19 17:54:45 +00:00
Jochen Sprickerhof
316eb43303 Add Gitlab CI 2022-09-19 19:51:15 +02:00
Dianne Skoll
576112a39a Merge branch 'drop_fgrep' into 'master'
Replace deprecated fgrep by grep

See merge request dskoll/remind!1
2022-09-19 17:50:03 +00:00
Jochen Sprickerhof
6607223abb Replace deprecated fgrep by grep -F 2022-09-19 19:49:20 +02:00
Dianne Skoll
9e85b1932d Mark today in bold iff "remind -c" color output is enabled. 2022-09-19 11:32:10 -04:00
Dianne Skoll
4ba7f5b1f2 Only embolden today if stdout is a tty 2022-09-19 10:44:21 -04:00
Dianne Skoll
fc93ae890a Allow NULL pointers to be supplied to FromJulian if we are not interested in specific values 2022-09-17 23:04:34 -04:00
Dianne Skoll
8051d01945 Document change in Makefile install/install-stripped targets. 2022-09-17 09:07:27 -04:00
Dianne Skoll
63430c59f7 Make "make install" *not* strip debugging symbols; add "make install-stripped" target to strip them. 2022-09-17 09:04:45 -04:00
Dianne Skoll
c646bfc63f Make today's date bold in -c mode. 2022-09-16 21:01:10 -04:00
Dianne Skoll
58dea8f69b Support greyscale version of SHADE. 2022-09-16 20:44:59 -04:00
Jochen Sprickerhof
712aa08fbc make test depend on all 2022-09-08 16:32:04 +02:00
13 changed files with 179 additions and 95 deletions

13
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,13 @@
tests:
image: 'debian:stable-slim'
before_script:
- apt update && apt-get -y install gcc make
- useradd --create-home testuser
- chown -R testuser .
- chmod -R go-w .
script:
- LANG=C.UTF-8 su testuser -c 'make test'
artifacts:
when: always
paths:
- tests/test.out

View File

@@ -12,11 +12,11 @@ all: src/Makefile
@$(MAKE) -C rem2pdf -f Makefile.top
install:
@echo ""
@echo "*********************"
@echo "* *"
@echo "* Installing REMIND *"
@echo "* *"
@echo "*********************"
@echo "**********************************"
@echo "* *"
@echo "* Installing REMIND (unstripped) *"
@echo "* *"
@echo "**********************************"
@echo ""
@$(MAKE) -C src install
@$(MAKE) -C rem2html install
@@ -27,19 +27,19 @@ clean:
-$(MAKE) -C src clean
-$(MAKE) -C rem2pdf clean
install-nostripped:
install-stripped:
@echo ""
@echo "**********************************"
@echo "* *"
@echo "* Installing REMIND (unstripped) *"
@echo "* *"
@echo "********************************"
@echo "* *"
@echo "* Installing REMIND (stripped) *"
@echo "* *"
@echo "**********************************"
@echo ""
@$(MAKE) -C src install-nostripped
@$(MAKE) -C src install-stripped
@$(MAKE) -C rem2html install
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE)
test:
test: all
@$(MAKE) -C src -s test
distclean: clean

View File

@@ -16,8 +16,12 @@ CHANGES TO REMIND
output is going to terminal, "FILE" if it's redirected to a plain file,
or "PIPE" if it's going to a pipe. See the man page for all the details.
- IMPROVEMENT: Add "make install-nostripped" top-level target for people who
want to build Remind with debugging symbols intact.
- CHANGE: "make install" now no longer strips debugging symbols from the
remind and rem2ps executables. Use "make install-stripped" if you want
them stripped.
- CHANGE: remind: "remind -c" highlights today's date in bold, if
colors are enabled.
- DOCUMENTATION FIX: Document behavior of DO and filedir() with respect
to symbolic links.
@@ -34,6 +38,16 @@ CHANGES TO REMIND
- BUG FIX: If the first REM command to trigger was a RUN command, the banner
would not print. This has been fixed.
- BUG FIX: replace deprecated 'fgrep' with 'grep -F' (Jochen Sprickerhof)
- BUG FIX: make "make test" depend on "make all" (Jochen Sprickerhof)
- BUG FIX: make "REM ... SATISFY ... MSG foo" respect $DefaultColor. Bug
reported by Gunther Reißig.
- BUG FIX: Don't consider IFTRIG true if we could not compute a trigger date.
Bug noted by Gunther Reißig
* VERSION 4.0 Patch 3 - 2022-08-16
- IMPROVEMENT: remind: add plain_body and calendar_body JSON keys in -pp...
@@ -1248,7 +1262,7 @@ CHANGES TO REMIND
- Made parser _very_ forgiving -- the type of reminder now defaults
to MSG. This lets you have lines in the reminder file like this:
Feb 9, 1998 Meeting with Joe.
Feb 9, 1998 Meeting with Joe.
But I don't recommend abusing it. It's mostly to ease migration from
UNIX calendar(1) files.
@@ -1839,7 +1853,7 @@ CHANGES TO REMIND
- Removed identifiers in the C source beginning with "_" to conform
to ANSI practice.
- Fixed a bug in the -u option which resulted in environment variables
SHELL and USER not being set correctly. Also made -u set the LOGNAME
environment variable.
@@ -1912,7 +1926,7 @@ CHANGES TO REMIND
- Fixed all the source files to include "config.h" first.
- Changed the way triggers are calculated so that trigger dates are
- Changed the way triggers are calculated so that trigger dates are
always valid if year, month and day are specified, and there is no
UNTIL clause. See MAN page section "DETAILS ABOUT TRIGVALID()."
@@ -2054,6 +2068,3 @@ CHANGES TO REMIND
* Version 1.0
- never publicly released.

View File

@@ -36,7 +36,7 @@ REMINDOBJS= $(REMINDSRCS:.c=.o)
all: remind rem2ps
test: remind
test: all
@sh ../tests/test-rem
.c.o:
@@ -50,7 +50,7 @@ rem2ps: rem2ps.o dynbuf.o json.o
remind: $(REMINDOBJS)
@CC@ @CFLAGS@ @LDFLAGS@ $(LDEXTRA) -o remind $(REMINDOBJS) @LIBS@
install-nostripped: all
install: all
-mkdir -p $(DESTDIR)$(bindir) || true
for prog in $(PROGS) $(SCRIPTS) ; do \
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir) || exit 1; \
@@ -64,7 +64,7 @@ install-nostripped: all
-mkdir -p $(DESTDIR)$(datarootdir)/remind || true
cp -R ../include/* $(DESTDIR)$(datarootdir)/remind
install: install-nostripped
install-stripped: install
strip $(DESTDIR)$(bindir)/remind || true
strip $(DESTDIR)$(bindir)/rem2ps || true

View File

@@ -301,8 +301,8 @@ static void WriteCalDays (void);
static int
DayOf(int jul)
{
int y, m, d;
FromJulian(jul, &y, &m, &d);
int d;
FromJulian(jul, NULL, NULL, &d);
return d;
}
@@ -745,7 +745,11 @@ SetShadeEntry(int jul, char const *shade)
}
if (sscanf(shade, "%d %d %d", &r, &g, &b) != 3) {
return;
if (sscanf(shade, "%d", &r) != 1) {
return;
}
g = r;
b = r;
}
if (r < 0 || g < 0 || b < 0 || r > 255 || g > 255 || b > 255) {
return;
@@ -914,10 +918,18 @@ static void DoCalendarOneWeek(int nleft)
snprintf(buf, sizeof(buf), "%d %s ", d, get_month_abbrev(mon));
}
}
if (OrigJul+i == RealToday)
PrintLeft(buf, ColSpaces, '*');
else
if (OrigJul+i == RealToday) {
if (UseVTColors) {
printf("\x1B[1m"); /* Bold */
}
PrintLeft(buf, ColSpaces-1, '*');
if (UseVTColors) {
printf("\x1B[0m"); /* Normal */
}
putchar(' ');
} else {
PrintLeft(buf, ColSpaces, ' ');
}
gon();
DRAW(tb);
goff();
@@ -1129,7 +1141,13 @@ static int WriteCalendarRow(void)
}
}
if (Julian(y, m, d+i-wd) == RealToday) {
if (UseVTColors) {
printf("\x1B[1m"); /* Bold */
}
PrintLeft(buf, ColSpaces-1, '*');
if (UseVTColors) {
printf("\x1B[0m"); /* Normal */
}
putchar(' ');
} else {
PrintLeft(buf, ColSpaces, ' ');
@@ -1834,6 +1852,19 @@ static int DoCalRem(ParsePtr p, int col)
DBufFree(&buf);
}
trig.typ = tok.val;
if (trig.typ == MSG_TYPE ||
trig.typ == CAL_TYPE ||
trig.typ == MSF_TYPE) {
is_color = (
DefaultColorR != -1
&& DefaultColorG != -1
&& DefaultColorB != -1);
if (is_color) {
col_r = DefaultColorR;
col_g = DefaultColorG;
col_b = DefaultColorB;
}
}
jul = LastTriggerDate;
if (!LastTrigValid) {
FreeTrig(&trig);

View File

@@ -869,7 +869,6 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
}
}
static int DidMsgReminder = 0;
/***************************************************************/
/* */

View File

@@ -111,6 +111,7 @@ EXTERN INIT( int LastTriggerTime, 0);
EXTERN INIT( int ShouldCache, 0);
EXTERN char const *CurLine;
EXTERN INIT( int NumTriggered, 0);
EXTERN INIT( int DidMsgReminder, 0);
EXTERN int ArgC;
EXTERN char const **ArgV;
EXTERN INIT( int CalLines, CAL_LINES);

View File

@@ -329,7 +329,8 @@ int Julian(int year, int month, int day)
/* */
/* FromJulian */
/* */
/* Convert a Julian date to year, month, day. */
/* Convert a Julian date to year, month, day. You may supply */
/* NULL for y, m or d if you're not interested in that value */
/* */
/***************************************************************/
void FromJulian(int jul, int *y, int *m, int *d)
@@ -358,9 +359,15 @@ void FromJulian(int jul, int *y, int *m, int *d)
try_mon++;
t = DaysInMonth(try_mon, try_yr);
}
*y = try_yr;
*m = try_mon;
*d = jul + 1;
if (y) {
*y = try_yr;
}
if (m) {
*m = try_mon;
}
if (d) {
*d = jul + 1;
}
return;
}
@@ -857,19 +864,19 @@ int DoIfTrig(ParsePtr p)
Eprint("%s", ErrMsg[r]);
}
}
syndrome = IF_TRUE | BEFORE_ELSE;
syndrome = IF_FALSE | BEFORE_ELSE;
}
else {
if (ShouldTriggerReminder(&trig, &tim, jul, &err)) {
syndrome = IF_TRUE | BEFORE_ELSE;
} else {
syndrome = IF_FALSE | BEFORE_ELSE;
if (PurgeMode) {
PurgeEchoLine("%s\n", "#!P: The next IFTRIG did not trigger.");
PurgeEchoLine("%s\n", "#!P: REM statements in IFTRIG block not checked for purging.");
}
}
}
if (syndrome == (IF_FALSE | BEFORE_ELSE) && PurgeMode) {
PurgeEchoLine("%s\n", "#!P: The next IFTRIG did not trigger.");
PurgeEchoLine("%s\n", "#!P: REM statements in IFTRIG block not checked for purging.");
}
FreeTrig(&trig);
}
NumIfs++;

View File

@@ -127,7 +127,7 @@ void HandleQueuedReminders(void)
struct sigaction sa;
/* Suppress the BANNER from being issued */
NumTriggered = 1;
DidMsgReminder = 1;
/* Turn off sorting -- otherwise, TriggerReminder has no effect! */
SortByDate = 0;

View File

@@ -15,3 +15,6 @@ REM 28 SPECIAL COLOUR 129 0 129 Bright Magenta
REM 28 SPECIAL COLOUR 129 129 0 Bright Yellow
REM 28 SPECIAL COLOUR 129 129 129 Bright White
SET $DefaultColor "255 255 0"
REM 23 SATISFY [1] MSG DefaultColor_Yellow

View File

@@ -370,7 +370,7 @@ fi
../src/remind -cu '-i$SuppressLRM=1' ../tests/utf-8.rem 1 Nov 2019 >> ../tests/test.out
# Remove references to SysInclude, which is build-specific
fgrep -v '$SysInclude' < ../tests/test.out > ../tests/test.out.1 && mv -f ../tests/test.out.1 ../tests/test.out
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
if [ "$?" = "0" ]; then
echo "Remind: Acceptance test PASSED"

View File

@@ -3777,16 +3777,30 @@ set x psmoon(0)
psmoon(0) => ../tests/test.rem(732): psmoon() is deprecated; use SPECIAL MOON instead.
"gsave 0 setgray newpath Border DaySize 2"...
# Recursive expression evaluation
FSET _f(x) 0
SET tmp evaltrig("Wed SKIP OMITFUNC _f",date(1992,1,8))
date(1992, 1, 8) => 1992-01-08
evaltrig("Wed SKIP OMITFUNC _f", 1992-01-08) => Entering UserFN _f(1992-01-08)
Leaving UserFN _f() => 0
../tests/test.rem(736): Trig = Wednesday, 8 January, 1992
1992-01-08
REM MSG [tmp]
../tests/test.rem(737): Trig = Saturday, 16 February, 1991
tmp => 1992-01-08
1992-01-08
# Trig
IF trig("sun +1") || trig("thu +1")
trig("sun +1") => ../tests/test.rem(735): Trig = Sunday, 17 February, 1991
trig("sun +1") => ../tests/test.rem(740): Trig = Sunday, 17 February, 1991
1991-02-17
trig("thu +1") => ../tests/test.rem(735): Trig = Thursday, 21 February, 1991
trig("thu +1") => ../tests/test.rem(740): Trig = Thursday, 21 February, 1991
1990-01-01
1991-02-17 || 1990-01-01 => 1991-02-17
REM [trig()] +1 MSG Foo %b
trig() => 1991-02-17
../tests/test.rem(736): Trig = Sunday, 17 February, 1991
../tests/test.rem(741): Trig = Sunday, 17 February, 1991
Foo tomorrow
ENDIF
@@ -3794,15 +3808,15 @@ ENDIF
# Trig with a bad warnfunc
FSET w(x) x/0
IF trig("sun warn w") || trig("thu warn w")
trig("sun warn w") => ../tests/test.rem(741): Trig = Sunday, 17 February, 1991
trig("sun warn w") => ../tests/test.rem(746): Trig = Sunday, 17 February, 1991
Entering UserFN w(1)
x => 1
1 / 0 => Division by zero
../tests/test.rem(741):
../tests/test.rem(740): In function `w': `/': Division by zero
../tests/test.rem(746):
../tests/test.rem(745): In function `w': `/': Division by zero
Leaving UserFN w() => Division by zero
1990-01-01
trig("thu warn w") => ../tests/test.rem(741): Trig = Thursday, 21 February, 1991
trig("thu warn w") => ../tests/test.rem(746): Trig = Thursday, 21 February, 1991
Entering UserFN w(1)
x => 1
1 / 0 => Division by zero
@@ -3818,7 +3832,7 @@ FSET w(x) choose(x, 5, 3, 1, 0)
# Ugh. This is where short-circuit logical operators
# would really come in handy.
IF trig("sun warn w") || trig("thu warn w")
trig("sun warn w") => ../tests/test.rem(750): Trig = Sunday, 17 February, 1991
trig("sun warn w") => ../tests/test.rem(755): Trig = Sunday, 17 February, 1991
Entering UserFN w(1)
x => 1
choose(1, 5, 3, 1, 0) => 5
@@ -3832,7 +3846,7 @@ x => 3
choose(3, 5, 3, 1, 0) => 1
Leaving UserFN w() => 1
1991-02-17
trig("thu warn w") => ../tests/test.rem(750): Trig = Thursday, 21 February, 1991
trig("thu warn w") => ../tests/test.rem(755): Trig = Thursday, 21 February, 1991
Entering UserFN w(1)
x => 1
choose(1, 5, 3, 1, 0) => 5
@@ -3841,92 +3855,92 @@ Leaving UserFN w() => 5
1991-02-17 || 1991-02-21 => 1991-02-17
REM [trig()] +5 MSG Foo %b
trig() => 1991-02-21
../tests/test.rem(751): Trig = Thursday, 21 February, 1991
../tests/test.rem(756): Trig = Thursday, 21 February, 1991
Foo in 5 days' time
ENDIF
REM [trig("Mon", "Tue", "Wed", "Sat")] MSG foo
trig("Mon", "Tue", "Wed", "Sat") => ../tests/test.rem(754): Trig = Monday, 18 February, 1991
../tests/test.rem(754): Trig = Tuesday, 19 February, 1991
../tests/test.rem(754): Trig = Wednesday, 20 February, 1991
../tests/test.rem(754): Trig = Saturday, 16 February, 1991
trig("Mon", "Tue", "Wed", "Sat") => ../tests/test.rem(759): Trig = Monday, 18 February, 1991
../tests/test.rem(759): Trig = Tuesday, 19 February, 1991
../tests/test.rem(759): Trig = Wednesday, 20 February, 1991
../tests/test.rem(759): Trig = Saturday, 16 February, 1991
1991-02-16
../tests/test.rem(754): Trig = Saturday, 16 February, 1991
../tests/test.rem(759): Trig = Saturday, 16 February, 1991
foo
REM [trig("Mon", "Tue", "Wed")] MSG bar
trig("Mon", "Tue", "Wed") => ../tests/test.rem(755): Trig = Monday, 18 February, 1991
../tests/test.rem(755): Trig = Tuesday, 19 February, 1991
../tests/test.rem(755): Trig = Wednesday, 20 February, 1991
trig("Mon", "Tue", "Wed") => ../tests/test.rem(760): Trig = Monday, 18 February, 1991
../tests/test.rem(760): Trig = Tuesday, 19 February, 1991
../tests/test.rem(760): Trig = Wednesday, 20 February, 1991
1990-01-01
../tests/test.rem(755): Expired
../tests/test.rem(760): Expired
# The new syntactic sugar
REM First Monday January MSG x
../tests/test.rem(758): Trig = Monday, 6 January, 1992
../tests/test.rem(763): Trig = Monday, 6 January, 1992
REM Second Tuesday in April MSG x
../tests/test.rem(759): Trig = Tuesday, 9 April, 1991
../tests/test.rem(764): Trig = Tuesday, 9 April, 1991
REM Third Wednesday in October MSG x
../tests/test.rem(760): Trig = Wednesday, 16 October, 1991
../tests/test.rem(765): Trig = Wednesday, 16 October, 1991
REM Fourth Friday in July MSG x
../tests/test.rem(761): Trig = Friday, 26 July, 1991
../tests/test.rem(766): Trig = Friday, 26 July, 1991
REM Last Tuesday in August MSG x
../tests/test.rem(762): Trig = Tuesday, 27 August, 1991
../tests/test.rem(767): Trig = Tuesday, 27 August, 1991
REM Last Sunday in December MSG x
../tests/test.rem(763): Trig = Sunday, 29 December, 1991
../tests/test.rem(768): Trig = Sunday, 29 December, 1991
REM First Monday January 2000 MSG x
../tests/test.rem(765): Trig = Monday, 3 January, 2000
../tests/test.rem(770): Trig = Monday, 3 January, 2000
REM Second Tuesday in April 2000 MSG x
../tests/test.rem(766): Trig = Tuesday, 11 April, 2000
../tests/test.rem(771): Trig = Tuesday, 11 April, 2000
REM Third Wednesday in October 2000 MSG x
../tests/test.rem(767): Trig = Wednesday, 18 October, 2000
../tests/test.rem(772): Trig = Wednesday, 18 October, 2000
REM Fourth Friday in July 2000 MSG x
../tests/test.rem(768): Trig = Friday, 28 July, 2000
../tests/test.rem(773): Trig = Friday, 28 July, 2000
REM Last Tuesday in August 2000 MSG x
../tests/test.rem(769): Trig = Tuesday, 29 August, 2000
../tests/test.rem(774): Trig = Tuesday, 29 August, 2000
REM Last Sunday in December 2000 MSG x
../tests/test.rem(770): Trig = Sunday, 31 December, 2000
../tests/test.rem(775): Trig = Sunday, 31 December, 2000
REM January ~~1 MSG y
../tests/test.rem(772): Trig = Friday, 31 January, 1992
../tests/test.rem(777): Trig = Friday, 31 January, 1992
REM February ~~1 MSG y
../tests/test.rem(773): Trig = Thursday, 28 February, 1991
../tests/test.rem(778): Trig = Thursday, 28 February, 1991
REM February ~~2 MSG y
../tests/test.rem(774): Trig = Wednesday, 27 February, 1991
../tests/test.rem(779): Trig = Wednesday, 27 February, 1991
REM February ~~3 MSG y
../tests/test.rem(775): Trig = Tuesday, 26 February, 1991
../tests/test.rem(780): Trig = Tuesday, 26 February, 1991
REM February ~~8 MSG y
../tests/test.rem(776): Trig = Thursday, 21 February, 1991
../tests/test.rem(781): Trig = Thursday, 21 February, 1991
REM February ~~20 MSG y
../tests/test.rem(777): Trig = Monday, 10 February, 1992
../tests/test.rem(782): Trig = Monday, 10 February, 1992
PUSH
OMIT 31 March
REM March ~1 MSG y
../tests/test.rem(780): Trig = Saturday, 30 March, 1991
../tests/test.rem(785): Trig = Saturday, 30 March, 1991
REM March ~~1 MSG y
../tests/test.rem(781): Trig = Sunday, 31 March, 1991
../tests/test.rem(786): Trig = Sunday, 31 March, 1991
REM Lastday March MSG y
../tests/test.rem(782): Trig = Sunday, 31 March, 1991
../tests/test.rem(787): Trig = Sunday, 31 March, 1991
REM Lastworkday March MSG y
../tests/test.rem(783): Trig = Saturday, 30 March, 1991
../tests/test.rem(788): Trig = Saturday, 30 March, 1991
POP
REM Dec 2000 ~~1 MSG y
../tests/test.rem(785): Trig = Sunday, 31 December, 2000
../tests/test.rem(790): Trig = Sunday, 31 December, 2000
REM Dec 2000 ~~2 MSG y
../tests/test.rem(786): Trig = Saturday, 30 December, 2000
../tests/test.rem(791): Trig = Saturday, 30 December, 2000
REM Dec 2000 ~~3 MSG y
../tests/test.rem(787): Trig = Friday, 29 December, 2000
../tests/test.rem(792): Trig = Friday, 29 December, 2000
REM Dec 2000 ~~7 MSG y
../tests/test.rem(788): Trig = Monday, 25 December, 2000
../tests/test.rem(793): Trig = Monday, 25 December, 2000
REM Jan 2001 ~~1 MSG y
../tests/test.rem(789): Trig = Wednesday, 31 January, 2001
../tests/test.rem(794): Trig = Wednesday, 31 January, 2001
REM Lastday April 2022 OMIT SAT SUN MSG foo
../tests/test.rem(791): Trig = Saturday, 30 April, 2022
../tests/test.rem(796): Trig = Saturday, 30 April, 2022
REM Lastworkday April 2022 OMIT SAT SUN MSG foo
../tests/test.rem(792): Trig = Friday, 29 April, 2022
../tests/test.rem(797): Trig = Friday, 29 April, 2022
SET a pad(1, "0", 2)
pad(1, "0", 2) => "01"
@@ -3944,7 +3958,7 @@ set a pad("foo", "0", $MaxStringLen+1)
$MaxStringLen => 65535
65535 + 1 => 65536
pad("foo", "0", 65536) => String too long
../tests/test.rem(800): String too long
../tests/test.rem(805): String too long
# Test OMIT
CLEAR-OMIT-CONTEXT
@@ -3954,7 +3968,7 @@ OMIT Jun THROUGH July 15
OMIT Sep 5 THROUGH Sep 10
OMIT 2024-12-25 THROUGH 2025-01-04
OMIT Apr 2022 through July
../tests/test.rem(809): Bad date specification
../tests/test.rem(814): Bad date specification
OMIT DUMP
Global Full OMITs (11 of maximum allowed 1000):
@@ -4053,10 +4067,10 @@ Global Partial OMITs (81 of maximum allowed 366):
09-10
CLEAR-OMIT-CONTEXT
OMIT 2000-01-01 THROUGH 2020-12-31
../tests/test.rem(813): Too many full OMITs
../tests/test.rem(818): Too many full OMITs
OMIT Dec 5 2029 through Dec 4 2029
../tests/test.rem(815): Error: THROUGH date earlier than start date
../tests/test.rem(820): Error: THROUGH date earlier than start date
# Don't want Remind to queue reminders
EXIT
@@ -5353,8 +5367,8 @@ Color Test
(0tqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqu(B
(0x(B19 (0x(B20 (0x(B21 (0x(B22 (0x(B23 (0x(B24 (0x(B25 (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(BDefaultCol(0x(B (0x(B (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(Bor_Yellow (0x(B (0x(B (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B

View File

@@ -731,6 +731,11 @@ msg [a]
set x psshade(50)
set x psmoon(0)
# Recursive expression evaluation
FSET _f(x) 0
SET tmp evaltrig("Wed SKIP OMITFUNC _f",date(1992,1,8))
REM MSG [tmp]
# Trig
IF trig("sun +1") || trig("thu +1")
REM [trig()] +1 MSG Foo %b