cmd: Add test to show ~dp0 should be directory containing batch file.
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 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 @@
 ------------ 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@\