Has anyone written conformance tests for cmd?
I imagine they'd mostly just be a bunch of batch files with matching expected output files.
On Fri, Dec 18, 2009 at 11:09 PM, Dan Kegel dank@kegel.com wrote:
I started to add some to appinstall, but haven't found the time. One thing that makes it a bit hard is that the only way to catch stdout from a program is to run it from a command prompt on windows, and hence, in appinstall. But if you simply made a batch file that printed a bunch of different lines, you could then compare the output to the known good, using autohotkey pretty easily.
Austin English a écrit :
If you want to control more closely commands vs output you can toy with http://github.com/ericZp/wdtp/blob/master/test_cl.h
A+
On Fri, Dec 18, 2009 at 11:50 PM, Eric Pouech eric.pouech@orange.fr wrote:
If you want to control more closely commands vs output you can toy with http://github.com/ericZp/wdtp/blob/master/test_cl.h
I would have thought that overkill for a batch mode program like cmd, but it appears to have several interactive commands: pause choice set /p so yeah, something like that will be needed.
Then there's the question of how to integrate it into the wine test suite. I suspect the way to go is to have a make rule that converts the input and expected output files into hex byte arrays in a generated .c file, to use the normal wine test infrastructure by copying dlls/Maketest.rules.in to programs/Maketest.rules.in
Sound good?
Dan Kegel a écrit :
the idea of test_cl.h is to have something similar to our test suite, but for command line programs so you can still have the ok() rules, the only thing that test_cl.h does is to give helpers to drive the program to be tested, and simplify sending commands and fetching their output
but, of course, you need first to allow test Make rules to be allowed in programs/ subdirectory A+
2009/12/19 Eric Pouech eric.pouech@orange.fr:
What about redirecting io pipes and use CreateProcess ? msdn has some examples : http://msdn.microsoft.com/en-us/library/ms682499%28VS.85%29.aspx
that's what test_cl.h does... A+