Start adding TODO tests.

This commit is contained in:
Dianne Skoll
2025-08-13 11:53:56 -04:00
parent 79a87c6f1a
commit 5217d9b675
3 changed files with 63 additions and 0 deletions

View File

@@ -759,6 +759,17 @@ EOF
# Make sure all the include files are ok
find ../include -type f -name '*.rem' | while read x; do ../src/remind -du -n $x 1 Jan 2024 2>>../tests/test.out 1>/dev/null; done
# Test todos
echo "" >> ../tests/test.out 2>&1
echo "Testing TODOS in agenda mode" >> ../tests/test.out 2>&1
../src/remind ../tests/todos.rem 2025-08-13 >> ../tests/test.out 2>&1
echo "" >> ../tests/test.out 2>&1
echo "Testing TODOS in calendar mode" >> ../tests/test.out 2>&1
../src/remind -s ../tests/todos.rem 2025-08-13 >> ../tests/test.out 2>&1
echo "" >> ../tests/test.out 2>&1
echo "Testing TODOS in calendar mode with completed todos hidden" >> ../tests/test.out 2>&1
../src/remind -s --hide-completed-todos ../tests/todos.rem 2025-08-13 >> ../tests/test.out 2>&1
cmp -s ../tests/test.out ../tests/test.cmp
if [ "$?" = "0" ]; then
echo "Remind: Acceptance test PASSED"

View File

@@ -39540,3 +39540,43 @@ On odd days
2000/06/30 * * * * Always
2000/06/30 * * * * On even days
2000/06/30 * * * * On days divisible by 5
Testing TODOS in agenda mode
First on 2025-08-01
Second on 2022-08-01
Third on 2023-08-01
Fourth on 2025-08-20
Fifth today
Sixth on 2025-08-06
Eighth on 2025-08-20
Ninth today
Testing TODOS in calendar mode
2025/08/01 * * * * First
2025/08/01 * * * * Second
2025/08/01 * * * * Third
2025/08/06 * * * * Sixth
2025/08/06 * * * * Seventh
2025/08/06 * * * * Eighth
2025/08/06 * * * * Ninth
2025/08/13 * * * * Fifth
2025/08/13 * * * * Eighth
2025/08/13 * * * * Ninth
2025/08/20 * * * * Fourth
2025/08/20 * * * * Eighth
2025/08/20 * * * * Ninth
2025/08/27 * * * * Eighth
2025/08/27 * * * * Ninth
Testing TODOS in calendar mode with completed todos hidden
2025/08/01 * * * * First
2025/08/01 * * * * Second
2025/08/01 * * * * Third
2025/08/06 * * * * Sixth
2025/08/13 * * * * Fifth
2025/08/13 * * * * Ninth
2025/08/20 * * * * Fourth
2025/08/20 * * * * Eighth
2025/08/20 * * * * Ninth
2025/08/27 * * * * Eighth
2025/08/27 * * * * Ninth

12
tests/todos.rem Normal file
View File

@@ -0,0 +1,12 @@
BANNER %
SET $AddBlankLines 0
REM TODO 1 Aug 2025 MSG %"First%" %l
REM TODO 1 Aug COMPLETE-THROUGH 2022-07-31 MSG %"Second%" %l
REM TODO 1 Aug COMPLETE-THROUGH 2022-08-01 MSG %"Third%" %l
REM TODO 20 Aug 2025 +7 MSG %"Fourth%" %l
REM TODO 13 Aug 2025 +7 MSG %"Fifth%" %l
REM TODO 6 Aug 2025 +7 MSG %"Sixth%" %l
REM TODO COMPLETE-THROUGH 2025-08-06 6 Aug 2025 +7 MSG %"Seventh%" %l
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-13 MSG %"Eighth%" %l
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-12 MSG %"Ninth%" %l