Skip to content

Commit 5edefba

Browse files
committed
update tst-if.bat for /i and not options and if missing command to execute if condition is true
1 parent fdd9a47 commit 5edefba

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/tst-if.bat

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,35 @@ echo You should see passed probes 1, 3, 5, 7, 9,& 11 and no failed one
7070
echo.
7171
pause
7272

73+
cls
74+
ECHO Testing /I and NOT options
75+
ECHO.
76+
if NOT a==A echo Probe #1 passed
77+
if /I a==A echo Probe #2 passed
78+
if /I NOT a==A echo Probe #3 failed
79+
if NOT /I a==A echo Probe #4 failed
80+
if /i b==A echo Probe #5 failed
81+
if not /i not b==A ECHO Probe #6 passed
82+
if /i a==A echo Probe #7 passed
83+
if /i not exist nicht-da.tgl echo Probe #8 passed
84+
if /i exist nicht-da.tgl echo Probe #9 failed
85+
if not exist nicht-da.tgl echo Probe #10 passed
86+
echo.
87+
echo You should see passed probes 1, 2, 6, 7, 8, & 10 and no failed ones
88+
echo.
89+
pause
90+
91+
cls
92+
ECHO Testing incomplete COMMAND
93+
ECHO you should see multiple error messages "IF: Missing command" or similar message
94+
ECHO.
95+
REM [a==a], [a==a ], [a==a] note the middle one has a space before the end of line and other 2 do not
96+
if a==a ECHO Next 3 commands should fail
97+
if a==a
98+
if a==a
99+
if a==a
100+
echo.
101+
pause
102+
73103
echo.
74104
echo Test finished

0 commit comments

Comments
 (0)