Frédéric Delanoy : cmd/tests: Add basic "for" tests.

Alexandre Julliard julliard at winehq.org
Tue Jul 12 13:47:10 CDT 2011


Module: wine
Branch: master
Commit: 63a6a80d40a107f734b8a0c8617ba1302643cb7a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=63a6a80d40a107f734b8a0c8617ba1302643cb7a

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Mon Jul 11 23:34:05 2011 +0200

cmd/tests: Add basic "for" tests.

---

 programs/cmd/tests/test_builtins.cmd     |   23 +++++++++++++++++++++++
 programs/cmd/tests/test_builtins.cmd.exp |   16 ++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 11f6f10..3af488e 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -78,6 +78,29 @@ if /i not foo==FOO echo if /i seems to be broken
 if /I foo==FOO echo if /I seems to work
 if /I not foo==FOO echo if /I seems to be broken
 
+echo -----------Testing for -----------
+for %%i in (A B C) do echo %%i
+for %%i in (A B C) do call :forTestFun1 %%i
+goto :endForTestFun1
+:forTestFun1
+echo %1
+goto :eof
+:endForTestFun1
+for %%i in (X) do (
+    for %%j in (Y) do (
+        echo %%i %%j ))
+for %%i in (A B) do (
+    for %%j in (C D) do (
+        echo %%i %%j ))
+for %%i in (A B) do (
+    for %%j in (C D) do (
+        call :forTestFun2 %%i %%j ))
+goto :endForTestFun2
+:forTestFun2
+echo %1 %2
+goto :eof
+:endForTestFun2
+
 echo -----------Testing del /a-----------
 del /f/q *.test > nul
 echo r > r.test
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index efc1795..2f3e285 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -78,6 +78,22 @@ Testing case sensitivity with and without /i option
 if seems to default to case sensitivity
 if /i seems to work
 if /I seems to work
+-----------Testing for -----------
+A
+B
+C
+A
+B
+C
+ at todo_wine@X Y
+ at todo_wine@A C
+ at todo_wine@A D
+ at todo_wine@B C
+ at todo_wine@B D
+ at todo_wine@A C
+ at todo_wine@A D
+ at todo_wine@B C
+ at todo_wine@B D
 -----------Testing del /a-----------
 not-r.test not found after delete, good
 r.test found before delete, good




More information about the wine-cvs mailing list