cmd/tests: Test del /s recursion in subdirectories with colons.

Octavian Voicu octavian.voicu at
Tue Aug 30 12:51:47 CDT 2011

2011/8/30 Frédéric Delanoy <frederic.delanoy at>:
> 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.

That's the whole point! I tested in cmd prompt on a Windows XP machine
(and I assume all Windows versions act the same in this regard), and
mkdir refuses to create a directory with colons in its name (same goes
with explorer). Even if it might be possible to create a directory
with a colon in its name by using some API, it's not relevant.

So this test is strictly for Wine -- but it does have to pass on
Windows too. The test I wrote is designed to fail (with a stack
overflow) if you revert my earlier patch. It's not like any (sane)
Windows application will be trying to create directories with colons
in their names, but if it happens that the users has such a directory,
you don't want Wine to go crashing because of it.

> 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

I don't see the point of actually testing if the directory was
created, because it will always fail on Windows (and you can't really
mark this failure as broken, because it's standard Windows behavior).


More information about the wine-devel mailing list