Dan Kegel : cmd: Add test to show ~dp0 should be directory containing batch file.

Alexandre Julliard julliard at winehq.org
Wed Feb 17 10:12:03 CST 2010


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

Author: Dan Kegel <dank at kegel.com>
Date:   Tue Feb 16 12:44:16 2010 -0800

cmd: Add test to show ~dp0 should be directory containing batch file.

---

 programs/cmd/tests/test_builtins.cmd     |    9 +++++++++
 programs/cmd/tests/test_builtins.cmd.out |    4 ++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 04a75ba..2c30f6c 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -14,3 +14,12 @@ echo ------------ Testing 'set' --------------
 echo set "FOO=bar" should not include the quotes in the variable value
 set "FOO=bar"
 echo %FOO%
+
+echo ------------ Testing variable expansion --------------
+echo ~dp0 should be directory containing batch file
+echo %~dp0
+mkdir dummydir
+cd dummydir
+echo %~dp0
+cd ..
+rmdir dummydir
diff --git a/programs/cmd/tests/test_builtins.cmd.out b/programs/cmd/tests/test_builtins.cmd.out
index 8b5202e..a72e35d 100644
--- a/programs/cmd/tests/test_builtins.cmd.out
+++ b/programs/cmd/tests/test_builtins.cmd.out
@@ -12,3 +12,7 @@ at-echoed-word
 ------------ Testing 'set' --------------
 set "FOO=bar" should not include the quotes in the variable value
 bar
+------------ Testing variable expansion --------------
+~dp0 should be directory containing batch file
+ at pwd@\
+ at pwd@\




More information about the wine-cvs mailing list