From 9185341b0cca145baa604df22c69a4817ca1ee72 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Tue, 31 Dec 2019 19:14:15 -0500 Subject: [PATCH] Add a test. --- tests/test.cmp | 29 +++++++++++++++++++++++++++++ tests/test.rem | 7 +++++++ 2 files changed, 36 insertions(+) diff --git a/tests/test.cmp b/tests/test.cmp index 09b83445..9fbb3bab 100644 --- a/tests/test.cmp +++ b/tests/test.cmp @@ -1326,6 +1326,35 @@ trigger(1991-02-28) => "28 February 1991" Leaving UserFN _i() => "28 February 1991" ../tests/test.rem(378): Trig = Thursday, 28 February, 1991 +# Check combo of SATISFY and long-duration events +REM 14 SATISFY [$Tw == 4] MSG Thursday, the 14th +../tests/test.rem(381): Trig = Thursday, 14 March, 1991 +$Tw => 4 +4 == 4 => 1 +../tests/test.rem(381): Trig(satisfied) = Thursday, 14 March, 1991 +REM 14 AT 16:00 DURATION 8:00 SATISFY [$Tw == 4] MSG Thursday, the 14th +../tests/test.rem(382): Trig = Thursday, 14 March, 1991 AT 16:00 DURATION 08:00 +$Tw => 4 +4 == 4 => 1 +../tests/test.rem(382): Trig(satisfied) = Thursday, 14 March, 1991 AT 16:00 DURATION 08:00 +REM 14 AT 16:00 DURATION 32:00 SATISFY [$Tw == 4] MSG Thursday, the 14th +../tests/test.rem(383): Trig = Thursday, 14 February, 1991 AT 16:00 DURATION 32:00 +$Tw => 4 +4 == 4 => 1 +../tests/test.rem(383): Trig(adj) = Saturday, 16 February, 1991 AT 00:00 DURATION 00:00 +../tests/test.rem(383): Trig(satisfied) = Saturday, 16 February, 1991 AT 00:00 DURATION 00:00 +Thursday, the 14th + +REM 14 AT 16:00 DURATION 40:00 SATISFY [$Tw == 4] MSG Thursday, the 14th +../tests/test.rem(384): Trig = Thursday, 14 February, 1991 AT 16:00 DURATION 40:00 +$Tw => 4 +4 == 4 => 1 +../tests/test.rem(384): Trig(adj) = Saturday, 16 February, 1991 AT 00:00 DURATION 08:00 +../tests/test.rem(384): Trig(satisfied) = Saturday, 16 February, 1991 AT 00:00 DURATION 08:00 +Thursday, the 14th + + + Test 2 diff --git a/tests/test.rem b/tests/test.rem index 420ad910..9a147aab 100644 --- a/tests/test.rem +++ b/tests/test.rem @@ -376,6 +376,13 @@ OMIT 26 Dec 2010 THROUGH 27 Dec 2010 MSG This is not legal OMIT DUMP # Regression test for bugfix in Hebrew calendar Adar jahrzeit [_i(14, "Adar", today(), 5761)] MSG Purim + +# Check combo of SATISFY and long-duration events +REM 14 SATISFY [$Tw == 4] MSG Thursday, the 14th +REM 14 AT 16:00 DURATION 8:00 SATISFY [$Tw == 4] MSG Thursday, the 14th +REM 14 AT 16:00 DURATION 32:00 SATISFY [$Tw == 4] MSG Thursday, the 14th +REM 14 AT 16:00 DURATION 40:00 SATISFY [$Tw == 4] MSG Thursday, the 14th + __EOF__ REM This line should not even be seen And you can put whatever you like here.