Added unit test for FTermDetection with a terminal simulation

This commit is contained in:
Markus Gans 2018-09-15 00:06:54 +02:00
parent 55d3e2a638
commit 0433a47ec1
3 changed files with 3 additions and 1 deletions

View File

@ -122,6 +122,7 @@ if [ "$1" = "--unit-test" ] \
|| [ "$1" = "coverage" ]
then
cd src/test && make check-TESTS
cat *.log 2>/dev/null
fi
# make install

View File

@ -1958,7 +1958,7 @@ pid_t FTermDetectionTest::forkProcess()
tcsetattr (fd_slave, TCSANOW, &term_settings);
closeStandardStreams();
fd_stdin = dup(fd_slave); // PTY becomes stdin (0)
fd_stdin = dup(fd_slave); // PTY becomes stdin (0)
fd_stdout = dup(fd_slave); // PTY becomes stdout (1)
fd_stderr = dup(fd_slave); // PTY becomes stderr (2)

View File

@ -19,6 +19,7 @@ int main (int, char**)
CPPUNIT_NS::TestRunner testrunner;
testrunner.addTest (CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
testrunner.run (testresult);
// Outputting results in compiler format
CPPUNIT_NS::CompilerOutputter compileroutputter ( &collectedresults
, std::cerr );