Windows stdout stderr beginner question
dhatlestad dhatlestad
dhatlestad at mail.com
Sat Jun 7 05:41:53 UTC 2003
In learning QMTest, I am having trouble using a simple stderr or stdout condition. When I test for a condition without a carriage return/line feed it works as expected. If there is a return in the condition however, no dice. Here is the simplest example I could come up with.
//---------------------------------------
// Program being tested
#include <iostream>
using namespace std;
int main (void)
{
cerr << "mytest" << endl;
return 0;
}
//---------------------------------------
The test file contents are:
<?xml version="1.0" ?>
<extension class="command.ExecTest" kind="test"><argument name="environment"><set/></argument><argument name="program"><text>\testbed\little1.exe</text></argument><argument name="resources"><set/></argument><argument name="arguments"><set/></argument><argument name="stderr"><text>mytest
</text></argument><argument name="stdout"><text/></argument><argument name="prerequisites"><set/></argument><argument name="stdin"><text/></argument><argument name="exit_code"><integer>0</integer></argument><argument name="target_group"><text>.*</text></argument></extension>
In spite of text wrapping in this message, the test only has a CR/LF after 'mytest.'
... <text>mytest
</text> ...
The test passes when I remove the CR/LF from the test and the endl from the source code. It fails when I have a CR/LF in the test and an endl in the source. I have checked for all of the CR/LF or CR only or LF only combinations without success. I also tried a cout/stdout test; no joy.
Platform: Windows 2000 SP3
Versions: QMTest 1.0.3, Python 2.2.3
Compilers: Digital Mars 8.34 (www.digitalmars.com) and Borland 5.6.4 (BCB 6)
Thanks for any help that you can provide.
Don H.
More information about the qmtest
mailing list