Add tests for push/pop in different files warnings.

This commit is contained in:
Dianne Skoll
2026-02-15 10:57:31 -05:00
parent c3a555942b
commit ab1a6c412a
4 changed files with 18 additions and 1 deletions

4
tests/test-pushpop1.rem Normal file
View File

@@ -0,0 +1,4 @@
PUSH-OMIT-CONTEXT
PUSH-FUNCS a b c
PUSH-VARS a b c
DO test-pushpop2.rem

4
tests/test-pushpop2.rem Normal file
View File

@@ -0,0 +1,4 @@
POP-VARS
POP-FUNCS
POP-OMIT-CONTEXT

View File

@@ -988,7 +988,11 @@ REM 15 INFO "Url: https://dianne.skoll.ca" SPECIAL COLOR 255 0 0 Hello, linky 4!
EOF
# Test the $Shaded system variable
$REMIND -pp ../tests/shaded.rem >> $OUT 2>&1
$REMIND -pp ../tests/shaded.rem 2026-02-01 >> $OUT 2>&1
# Test the push/pop warnings
$REMIND ../tests/test-pushpop1.rem 2026-01-01 >> $OUT 2>&1
$REMIND -dp ../tests/test-pushpop1.rem 2026-01-01 >> $OUT 2>&1
cmp -s $OUT $CMP
if [ "$?" = "0" ]; then

View File

@@ -40273,3 +40273,8 @@ March 31
{"date":"2026-02-27","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
{"date":"2026-02-28","filename":"../tests/shaded.rem","lineno":6,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":0,"b":255,"body":"0 0 255"}
# rem2ps2 end
No reminders.
../tests/test-pushpop2.rem(1): POP-VARS at ../tests/test-pushpop2.rem:1 matches PUSH-VARS in different file: ../tests/test-pushpop1.rem:3
../tests/test-pushpop2.rem(2): POP-FUNCS at ../tests/test-pushpop2.rem:2 matches PUSH-FUNCS in different file: ../tests/test-pushpop1.rem:2
../tests/test-pushpop2.rem(3): POP-OMIT-CONTEXT at ../tests/test-pushpop2.rem:3 matches PUSH-OMIT-CONTEXT in different file: ../tests/test-pushpop1.rem:1
No reminders.