On Tue, Aug 30, 2011 at 14:19, Octavian Voicu <octavian.vo...@gmail.com> wrote: > -- > Issue was fixed by 94d2312fe2fdd77669ac826afa24e6821571ebba. This test is to > prevent future regressions, as suggested by Frederic. > > Windows doesn't accept colons in directory names, so it will just fail on the > mkdir/rmdir commands and not affect the tests. > > --- > programs/cmd/tests/test_builtins.cmd | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/programs/cmd/tests/test_builtins.cmd > b/programs/cmd/tests/test_builtins.cmd > index 1250e89..34c44f5 100644 > --- a/programs/cmd/tests/test_builtins.cmd > +++ b/programs/cmd/tests/test_builtins.cmd > @@ -854,6 +854,7 @@ rmdir del_q_dir > echo ------------ Testing del /s -------------- > mkdir "foo bar" > cd "foo bar" > +mkdir "foo:" > echo hi > file1.dat > echo there > file2.dat > echo bub > file3.dat > @@ -868,6 +869,7 @@ for %%f in (1 2 3) do if exist file%%f.dat echo Del /s > failed on file%%f > for %%f in (1 2 3) do if exist file%%f.dat del file%%f.dat > if exist "file with spaces.dat" echo Del /s failed on "file with spaces.dat" > if exist "file with spaces.dat" del "file with spaces.dat" > +rmdir "foo:" > cd .. > rmdir "foo bar"
You don't test the result of your 'mkdir "foo:"'. You can't know from the test whether the dir was created and removed, or never existed. You should use something like "if exist ... echo blablabla", or a 'dir /b' in a directory to verify it's not created. Be aware that error messages are generally lost/discarded, so you have to test differently