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@\