From 8bc6ff9d906dd99703a4c79a06299b1cba5104cc Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Tue, 16 Feb 2010 12:44:16 -0800 Subject: [PATCH] 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(+) diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 04a75baf9fc..2c30f6c6ff8 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 8b5202ea734..a72e35d2339 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 +@pwd@\ +@pwd@\ -- 2.11.4.GIT