[1/2] cmd/tests: Add FOR /D tests (try 2)

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Jul 29 06:59:50 CDT 2011

Diff from original:
Only base case tests due to various deficiencies in current wine/cmd

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

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 4510074..94ec6e0 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -299,6 +299,22 @@ mkdir baz
 echo > bazbaz
 echo ...basic wildcards
 for %%i in (ba*) do echo %%i
+echo ...for /d
+for /d %%i in (baz foo bar) do echo %%i
+rem FIXME for /d incorrectly parses when wildcards are used
+rem for /d %%i in (bazb*) do echo %%i
+rem FIXME can't test wildcard expansion here since it's listed in directory
+rem order, and not in alphabetic order.
+rem Proper testing would need a currently missing "sort" program implementation.
+rem for /d %%i in (ba*) do echo %%i>> tmp
+rem sort < tmp
+rem del tmp
+rem for /d %%i in (?a*) do echo %%i>> tmp
+rem sort < tmp
+rem del tmp
+rem for /d %%i in (*) do echo %%i>> tmp
+rem sort < tmp
+rem del tmp
 cd ..
 rd /s/Q foobar
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index a050c14..7abfb21 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -216,6 +216,10 @@ C
 @todo_wine at B D
 ...basic wildcards
+...for /d
 -----------Testing del /a-----------
 not-r.test not found after delete, good
 r.test found before delete, good

More information about the wine-patches mailing list