From 7bd3601fafbecae415bd96fc24404b21338cd7a4 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Thu, 24 Nov 2016 11:29:37 +0100 Subject: [PATCH] make stderr visible in standalone test --- tst/integration/StandaloneTest.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tst/integration/StandaloneTest.cpp b/tst/integration/StandaloneTest.cpp index 6ad5f77..d008ec8 100644 --- a/tst/integration/StandaloneTest.cpp +++ b/tst/integration/StandaloneTest.cpp @@ -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(); } } -- 2.39.2