Add a test for queued reminders.

This commit is contained in:
Dianne Skoll
2024-02-02 15:17:01 -05:00
parent d5ce39ade1
commit ae01d7be43
4 changed files with 13 additions and 0 deletions

6
tests/queue1.rem Normal file
View File

@@ -0,0 +1,6 @@
FSET msgprefix(x) "Priority: " + x + "; Filename: " + filename() + ": "
REM at 23:59 MSG foo
REM PRIORITY 42 at 23:59 MSG bar
REM PRIORITY 999 at 23:39 MSQ quux
DO queue2.rem

1
tests/queue2.rem Normal file
View File

@@ -0,0 +1 @@
REM at 23:59 PRIORITY 2 MSG XXXX

View File

@@ -440,6 +440,9 @@ rm -rf include_dir/ww
# Test --version long option
../src/remind --version >> ../tests/test.out 2>&1
# Test queueing
echo JSONQUEUE | ../src/remind -z0 ../tests/queue1.rem >> ../tests/test.out 2>&1
# Remove references to SysInclude, which is build-specific
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

View File

@@ -11706,3 +11706,6 @@ Error reading include_dir/ww: Can't open file
SECURITY: Won't read world-writable file or directory!
Error reading include_dir/ww: No files matching *.rem
04.02.08
NOTE JSONQUEUE
[{"type":"MSG_TYPE","rundisabled":0,"ntrig":1,"priority":2,"filename":"../tests/queue2.rem","ttime":"23:59","nextttime":"23:59","delta":0,"rep":0,"body":"XXXX"},{"type":"MSG_TYPE","rundisabled":0,"ntrig":1,"priority":999,"filename":"../tests/queue1.rem","ttime":"23:39","nextttime":"23:39","delta":0,"rep":0,"body":"quux"},{"type":"MSG_TYPE","rundisabled":0,"ntrig":1,"priority":42,"filename":"../tests/queue1.rem","ttime":"23:59","nextttime":"23:59","delta":0,"rep":0,"body":"bar"},{"type":"MSG_TYPE","rundisabled":0,"ntrig":1,"priority":5000,"filename":"../tests/queue1.rem","ttime":"23:59","nextttime":"23:59","delta":0,"rep":0,"body":"foo"}]
NOTE ENDJSONQUEUE