[CMD_ROSTEST] Minor improvements for the echo-ed info of the builtins tests.

This commit is contained in:
Hermès Bélusca-Maïto 2020-07-29 18:04:05 +02:00
parent d85d991679
commit 23a52b2285
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 41 additions and 46 deletions

View file

@ -1,42 +1,48 @@
@echo off @echo off
echo ------------ Testing for1 ------------
echo --- plain FOR with multiple lines echo ------------ Testing FOR loop ------------
echo --- Multiple lines
for %%i in (A for %%i in (A
B B
C) do echo %%i C) do echo %%i
echo ------------ Testing for2 ------------
echo --- plain FOR with lines and spaces echo --- Lines and spaces
for %%i in (D for %%i in (D
E E
F) do echo %%i F) do echo %%i
echo ------------ Testing for3 ------------
echo --- plain FOR with multiple lines and commas echo --- Multiple lines and commas
for %%i in (G, for %%i in (G,
H, H,
I I
) do echo %%i ) do echo %%i
echo ------------ Testing for4 ------------
echo --- plain FOR with multiple lines and %%I echo --- Multiple lines and %%I
:: The FOR-variable is case-sensitive
for %%i in (J for %%i in (J
K K
L) do echo %%I L) do echo %%I
echo ------------ Testing for5 ------------
echo --- plain FOR with multiple lines and %%j echo --- Multiple lines and %%j
for %%i in (M, for %%i in (M,
N, N,
O O
) do echo %%j ) do echo %%j
echo ------------ Testing Amp-Amp ---------
echo --- test for something that is TRUE
ver | find "Ver" > NUL && Echo TRUE Amp-Amp echo ---------- Testing AND operator ----------
echo ------------ Testing Amp-Amp --------- :: Test for TRUE condition - Should be displayed
echo --- test for something that is FALSE ver | find "Ver" > NUL && echo TRUE AND condition
ver | find "1234" > NUL && Echo FALSE Amp-Amp
echo ------------ Testing Pipe-Pipe ------- :: Test for FALSE condition - Should not display
echo --- test for something that is TRUE ver | find "1234" > NUL && echo FALSE AND condition
ver | find "Ver" > NUL || Echo TRUE Pipe-Pipe
echo ------------ Testing Pipe-Pipe ------- echo ---------- Testing OR operator -----------
echo --- test for something that is FALSE :: Test for TRUE condition - Should not display
ver | find "1234" > NUL || Echo FALSE Pipe-Pipe ver | find "Ver" > NUL || echo TRUE OR condition
echo ------------ End of Testing ------------
echo --- Testing ends here :: Test for FALSE condition - Should be displayed
ver | find "1234" > NUL || echo FALSE OR condition
echo ------------- End of Testing -------------

View file

@ -1,37 +1,26 @@
------------ Testing for1 ------------ ------------ Testing FOR loop ------------
--- plain FOR with multiple lines --- Multiple lines
A A
B B
C C
------------ Testing for2 ------------ --- Lines and spaces
--- plain FOR with lines and spaces
D D
E E
F F
------------ Testing for3 ------------ --- Multiple lines and commas
--- plain FOR with multiple lines and commas
G G
H H
I I
------------ Testing for4 ------------ --- Multiple lines and %I
--- plain FOR with multiple lines and %I
%I %I
%I %I
%I %I
------------ Testing for5 ------------ --- Multiple lines and %j
--- plain FOR with multiple lines and %j
%j %j
%j %j
%j %j
------------ Testing Amp-Amp --------- ---------- Testing AND operator ----------
--- test for something that is TRUE TRUE AND condition
TRUE Amp-Amp ---------- Testing OR operator -----------
------------ Testing Amp-Amp --------- FALSE OR condition
--- test for something that is FALSE ------------- End of Testing -------------
------------ Testing Pipe-Pipe -------
--- test for something that is TRUE
------------ Testing Pipe-Pipe -------
--- test for something that is FALSE
FALSE Pipe-Pipe
------------ End of Testing ------------
--- Testing ends here