re: cmd: ensure create_full_path returns FALSE for all errors
2011/6/4 Frédéric Delanoy <frederic.delanoy(a)gmail.com>:
On Sat, Jun 4, 2011 at 19:27, Dan Kegel <dank(a)kegel.com> wrote:
Please add a test case, too.
OK. Do I need a testbot account as well?
Yeah. The cmd test suite is touchy, so it's worth it to use testbot to verify your test before you send it to wine-patches. I threw an example test case together for you. A quick run on xp seems to indicate you also need to set errorlevel, so I added that. See the patch attached to https://testbot.winehq.org/JobDetails.pl?Key=11484 It passes on all tested platforms. Feel free to submit along with your patch verbatim if it looks sufficient to you. (Oddly, windows xp's cmd doesn't seem to set errorlevel if you use rmdir on a nonexistent directory...) - Dan
2011/6/4 Dan Kegel <dank(a)kegel.com>:
https://testbot.winehq.org/JobDetails.pl?Key=11484 It passes on all tested platforms. Feel free to submit along with your patch verbatim if it looks sufficient to you.
BTW it looks like cmd test suite completely ignores stderr, which explains why that test passes even though the error message produced by wine's cmd and native cmd are different.
2011/6/4 Dan Kegel <dank(a)kegel.com>:
2011/6/4 Dan Kegel <dank(a)kegel.com>:
https://testbot.winehq.org/JobDetails.pl?Key=11484 It passes on all tested platforms. Feel free to submit along with your patch verbatim if it looks sufficient to you.
BTW it looks like cmd test suite completely ignores stderr, which explains why that test passes even though the error message produced by wine's cmd and native cmd are different.
BTW, there's a +rem warning, don't run any tests that depend on %ErrorLevel% after this line in your patch Is there really no way to reset ErrorLevel to a sane value? IMHO it makes more sense to use tests using ErrorLevel *after* its correct behaviour has been demonstrated, if possible...
2011/6/4 Frédéric Delanoy <frederic.delanoy(a)gmail.com>:
BTW, there's a +rem warning, don't run any tests that depend on %ErrorLevel% after this line in your patch
Is there really no way to reset ErrorLevel to a sane value?
It's more subtle than that. That section of code checks what happens when you try to set an environment variable named ErrorLevel, which is kind of a no-no; real world batch files shouldn't be doing that, as it doesn't do what one expects.
IMHO it makes more sense to use tests using ErrorLevel *after* its correct behaviour has been demonstrated, if possible...
Order should not be important, IMHO. We ought to be running each of those sections in its own little cmd session. That would prevent test failures from cascading into the next section. - Dan
participants (2)
-
Dan Kegel -
Frédéric Delanoy