Update test to verify that stdout and stderr from the child are sent to the same destination. git-svn-id: https://svn.microneil.com/svn/CodeDweller-Tests/trunk@52 b3372362-9eaa-4a85-aa2b-6faa1ab7c995master
// Write a single line and exit. | // Write a single line and exit. | ||||
if (std::string(argv[1]) == "write") { | if (std::string(argv[1]) == "write") { | ||||
log << "Command is \"write\". Returning \"This is a test\"" << std::endl; | |||||
std::cout << "This is a test"; | |||||
log << "Command is \"write\". Returning \"This is a test\"" | |||||
<< " to stdout and stderr." << std::endl; | |||||
std::cout << "This "; | |||||
std::cout.flush(); | |||||
std::cerr << "is a"; | |||||
std::cout << " test"; | |||||
std::cout.flush(); | std::cout.flush(); | ||||
if (!std::cout) { | if (!std::cout) { |
int main() | int main() | ||||
{ | { | ||||
// ChildStream is not supported. | |||||
#if 0 | |||||
std::cout << "\nCodeDweller::ChildStream unit tests\n" << std::endl; | std::cout << "\nCodeDweller::ChildStream unit tests\n" << std::endl; | ||||
RUN_TEST(testChildStreamIsDone); | RUN_TEST(testChildStreamIsDone); | ||||
RUN_TEST(testChildStreamReaderWriter); | RUN_TEST(testChildStreamReaderWriter); | ||||
RUN_TEST(testChildStreamBinaryRead); | RUN_TEST(testChildStreamBinaryRead); | ||||
RUN_TEST(testChildStreamNonBlockingRead); | RUN_TEST(testChildStreamNonBlockingRead); | ||||
#endif | |||||
std::cout << "\nCodeDweller::Child unit tests\n" << std::endl; | std::cout << "\nCodeDweller::Child unit tests\n" << std::endl; | ||||
RUN_TEST(testChildIsDone); | RUN_TEST(testChildIsDone); |