https://git.reactos.org/?p=reactos.git;a=commitdiff;h=23a52b2285086e73c75443...
commit 23a52b2285086e73c754433e8d159018f5f12ade Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Wed Jul 29 18:04:05 2020 +0200 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Wed Aug 19 20:35:53 2020 +0200
[CMD_ROSTEST] Minor improvements for the echo-ed info of the builtins tests. --- modules/rostests/win32/cmd/test_builtins.cmd | 54 +++++++++++++----------- modules/rostests/win32/cmd/test_builtins.cmd.exp | 33 +++++---------- 2 files changed, 41 insertions(+), 46 deletions(-)
diff --git a/modules/rostests/win32/cmd/test_builtins.cmd b/modules/rostests/win32/cmd/test_builtins.cmd index a61be8df9c2..dd4e1af9eab 100644 --- a/modules/rostests/win32/cmd/test_builtins.cmd +++ b/modules/rostests/win32/cmd/test_builtins.cmd @@ -1,42 +1,48 @@ @echo off -echo ------------ Testing for1 ------------ -echo --- plain FOR with multiple lines + +echo ------------ Testing FOR loop ------------ +echo --- Multiple lines for %%i in (A B C) do echo %%i -echo ------------ Testing for2 ------------ -echo --- plain FOR with lines and spaces + +echo --- Lines and spaces for %%i in (D E F) do echo %%i -echo ------------ Testing for3 ------------ -echo --- plain FOR with multiple lines and commas + +echo --- Multiple lines and commas for %%i in (G, H, 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 K L) do echo %%I -echo ------------ Testing for5 ------------ -echo --- plain FOR with multiple lines and %%j + +echo --- Multiple lines and %%j for %%i in (M, N, O ) do echo %%j -echo ------------ Testing Amp-Amp --------- -echo --- test for something that is TRUE -ver | find "Ver" > NUL && Echo TRUE Amp-Amp -echo ------------ Testing Amp-Amp --------- -echo --- test for something that is FALSE -ver | find "1234" > NUL && Echo FALSE Amp-Amp -echo ------------ Testing Pipe-Pipe ------- -echo --- test for something that is TRUE -ver | find "Ver" > NUL || Echo TRUE Pipe-Pipe -echo ------------ Testing Pipe-Pipe ------- -echo --- test for something that is FALSE -ver | find "1234" > NUL || Echo FALSE Pipe-Pipe -echo ------------ End of Testing ------------ -echo --- Testing ends here + + +echo ---------- Testing AND operator ---------- +:: Test for TRUE condition - Should be displayed +ver | find "Ver" > NUL && echo TRUE AND condition + +:: Test for FALSE condition - Should not display +ver | find "1234" > NUL && echo FALSE AND condition + +echo ---------- Testing OR operator ----------- +:: Test for TRUE condition - Should not display +ver | find "Ver" > NUL || echo TRUE OR condition + +:: Test for FALSE condition - Should be displayed +ver | find "1234" > NUL || echo FALSE OR condition + + +echo ------------- End of Testing ------------- diff --git a/modules/rostests/win32/cmd/test_builtins.cmd.exp b/modules/rostests/win32/cmd/test_builtins.cmd.exp index e149fab3deb..43f4a6b5b30 100644 --- a/modules/rostests/win32/cmd/test_builtins.cmd.exp +++ b/modules/rostests/win32/cmd/test_builtins.cmd.exp @@ -1,37 +1,26 @@ ------------- Testing for1 ------------ ---- plain FOR with multiple lines +------------ Testing FOR loop ------------ +--- Multiple lines A B C ------------- Testing for2 ------------ ---- plain FOR with lines and spaces +--- Lines and spaces D E F ------------- Testing for3 ------------ ---- plain FOR with multiple lines and commas +--- Multiple lines and commas G H I ------------- Testing for4 ------------ ---- plain FOR with multiple lines and %I +--- Multiple lines and %I %I %I %I ------------- Testing for5 ------------ ---- plain FOR with multiple lines and %j +--- Multiple lines and %j %j %j %j ------------- Testing Amp-Amp --------- ---- test for something that is TRUE -TRUE Amp-Amp ------------- Testing Amp-Amp --------- ---- test for something that is FALSE ------------- 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 +---------- Testing AND operator ---------- +TRUE AND condition +---------- Testing OR operator ----------- +FALSE OR condition +------------- End of Testing -------------