[PATCH] cmd: added some expansion tests. (try 2)
Yann Droneaud
yann at droneaud.fr
Tue Mar 9 06:15:35 CST 2010
Test automatic variables %CD% and %ERRORLEVEL%.
Test invalid patterns.
Test substitution in strings.
Commands tested on Microsoft Windows XP, English and French.
---
programs/cmd/tests/test_builtins.cmd | 15 +++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 15 +++++++++++++++
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index ed2b75b..e346ffa 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -23,6 +23,21 @@ cd dummydir
echo %~dp0
cd ..
rmdir dummydir
+echo %CD%
+echo %%
+echo P%
+echo %P
+echo %UNKNOWN%S
+echo P%UNKNOWN%
+echo P%UNKNOWN%S
+echo %ERRORLEVEL
+echo %ERRORLEVEL%
+echo %ERRORLEVEL%%ERRORLEVEL%
+echo %ERRORLEVEL%%
+echo %ERRORLEVEL%%%
+echo P%ERRORLEVEL%
+echo %ERRORLEVEL%S
+echo P%ERRORLEVEL%S
echo ------------ Testing if/else --------------
echo if/else should work with blocks
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 2c0e980..a8b2fc0 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -16,6 +16,21 @@ bar
~dp0 should be directory containing batch file
@pwd@\
@pwd@\
+ at pwd@
+%
+P
+P
+S
+P
+PS
+ERRORLEVEL
+0
+00
+0
+0%
+P0
+0S
+P0S
------------ Testing if/else --------------
if/else should work with blocks
if seems to work
--
1.6.2.5
More information about the wine-patches
mailing list