Skip to content

Commit eaa1109

Browse files
committed
Make sure we capture stderr
1 parent 1ca66de commit eaa1109

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ServiceControlInstaller.Engine.UnitTests/Setup/SetupInstanceTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System;
44
using System.Threading;
55
using Engine.Setup;
6+
using Mono.Cecil.Cil;
67
using NUnit.Framework;
78

89
[TestFixture]
@@ -25,6 +26,7 @@ public void Should_capture_and_rethrow_non_zero_exit_codes()
2526
var ex = Assert.Throws<Exception>(() => InstanceSetup.Run(TestContext.CurrentContext.WorkDirectory, "SetupProcessFake.exe", "test", "non-zero-exit-code", Timeout.Infinite));
2627

2728
Assert.That(ex.Message, Does.Contain("returned a non-zero exit code: 3"));
29+
Assert.That(ex.Message, Does.Contain("Fake non zero exit code message"));
2830
}
2931

3032
[Test]

src/SetupProcessFake/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
if (args.Any(a => a == "non-zero-exit-code"))
77
{
8+
Console.Error.WriteLine("Fake non zero exit code message");
9+
810
return 3;
911
}
1012

0 commit comments

Comments
 (0)