]> git.localhorst.tv Git - blank.git/commitdiff
make stderr visible in standalone test
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 24 Nov 2016 10:29:37 +0000 (11:29 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 24 Nov 2016 10:34:38 +0000 (11:34 +0100)
tst/integration/StandaloneTest.cpp

index 6ad5f77fdcc1957470b424106745d7d9955a0d87..d008ec806ac1a99321463c02a015a851762ba6f3 100644 (file)
@@ -20,11 +20,22 @@ void StandaloneTest::tearDown() {
 void StandaloneTest::testStartup() {
        TestInstance standalone({ "--no-vsync" });
        standalone.AssertRunning();
-       standalone.AssertOutputLine("chunk preloading complete");
-       standalone.Terminate();
+       try {
+               standalone.AssertOutputLine("chunk preloading complete");
+               standalone.Terminate();
+       } catch (...) {
+               try {
+                       standalone.Terminate();
+               } catch (...) { }
+               std::string output;
+               standalone.ExhaustError(output);
+               CPPUNIT_ASSERT_EQUAL_MESSAGE(
+                       "process stderr",
+                       std::string(""), output);
+               CPPUNIT_FAIL("exception in runtime");
+       }
        standalone.AssertExitStatus(0);
-       // can't do that because AL blurts out nonsense
-       //standalone.AssertNoError();
+       standalone.AssertNoError();
 }
 
 }