[7/7] cmd/tests: Additional CALL tests
Frédéric Delanoy
frederic.delanoy at gmail.com
Wed Jul 27 18:06:51 CDT 2011
---
programs/cmd/tests/test_builtins.cmd | 20 ++++++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 12 ++++++++++++
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 80a9a7f..dfceb1b 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -532,6 +532,13 @@ rem External script
echo echo foo %%1> foo.cmd
call foo
call foo.cmd 8
+echo echo %%1 %%2 > foo.cmd
+call foo.cmd foo
+call foo.cmd foo bar
+call foo.cmd foo ""
+call foo.cmd "" bar
+call foo.cmd foo ''
+call foo.cmd '' bar
del foo.cmd
rem Internal routines
call :testRoutine :testRoutine
@@ -540,6 +547,19 @@ goto :endTestRoutine
echo bar %1
goto :eof
:endTestRoutine
+
+call :testRoutineArgs foo
+call :testRoutineArgs foo bar
+call :testRoutineArgs foo ""
+call :testRoutineArgs "" bar
+call :testRoutineArgs foo ''
+call :testRoutineArgs '' bar
+goto :endTestRoutineArgs
+:testRoutineArgs
+echo %1 %2
+goto :eof
+:endTestRoutineArgs
+
rem Should work for builtins...
call mkdir foo
echo %ErrorLevel%
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 1c40eb1..e8d56c2 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -295,7 +295,19 @@ bar\baz removed
------------ Testing CALL --------------
foo at space@
@todo_wine at foo 8
+foo at space@@space@
+foo bar at space@
+ at todo_wine@foo ""@space@
+ at todo_wine@"" bar at space@
+foo ''@space@
+'' bar at space@
bar :testRoutine
+foo at space@
+foo bar
+ at todo_wine@foo ""
+ at todo_wine@"" bar
+foo ''
+'' bar
@todo_wine at 0
@todo_wine at foo created
@todo_wine at Should expand foobaz
--
1.7.6
More information about the wine-patches
mailing list