cmd: Add test for %~dp0 expansion (bug 21382)

Alexandre Julliard julliard at winehq.org
Fri Feb 12 03:55:35 CST 2010


Dan Kegel <dank at kegel.com> writes:

> --- /dev/null
> +++ b/programs/cmd/tests/test_dp0.cmd
> @@ -0,0 +1,10 @@
> + at echo off
> +echo Begin test for bug 21382
> +rem On old wine, ~dp0 was always current directory rather than "directory containing batch file"
> +echo %~dp0
> +mkdir dummydir
> +cd dummydir
> +echo %~dp0
> +cd ..
> +rmdir dummydir
> +echo End test for bug 21382
> diff --git a/programs/cmd/tests/test_dp0.cmd.out b/programs/cmd/tests/test_dp0.cmd.out
> new file mode 100644
> index 0000000..8c38153
> --- /dev/null
> +++ b/programs/cmd/tests/test_dp0.cmd.out
> @@ -0,0 +1,4 @@
> +Begin test for bug 21382
> + at pwd@\
> + at pwd@\
> +End test for bug 21382

Please don't create new files for every small test, this will become
unmanageable very quickly. Unless there are reasons to split them,
everything should go in a single .cmd file. Also don't use bug numbers,
add some meaningful message instead. The code must be understandable
without reference to bugzilla.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list