From 79d67dc84655c41d705141125f88a0c80150add4 Mon Sep 17 00:00:00 2001 From: Doug Lyons Date: Sun, 1 Sep 2019 16:03:16 -0500 Subject: [PATCH] Merge pull request #1889 from Doug-Lyons/find_regression_test Add Regression test for "find" using BAT with Conditionals "&&" and "||" --- modules/rostests/win32/cmd/test_builtins.cmd | 12 ++++++++++++ modules/rostests/win32/cmd/test_builtins.cmd.exp | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/modules/rostests/win32/cmd/test_builtins.cmd b/modules/rostests/win32/cmd/test_builtins.cmd index cc387c08e57..a61be8df9c2 100644 --- a/modules/rostests/win32/cmd/test_builtins.cmd +++ b/modules/rostests/win32/cmd/test_builtins.cmd @@ -26,5 +26,17 @@ 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 diff --git a/modules/rostests/win32/cmd/test_builtins.cmd.exp b/modules/rostests/win32/cmd/test_builtins.cmd.exp index c13f7018fab..e149fab3deb 100644 --- a/modules/rostests/win32/cmd/test_builtins.cmd.exp +++ b/modules/rostests/win32/cmd/test_builtins.cmd.exp @@ -23,5 +23,15 @@ I %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