@@ -13,7 +13,7 @@ public class PackageTestReport
1313 Runner = runner ;
1414
1515 var expectedResult = test . ExpectedResult ;
16- var expectedOutput = test . OutputCheck ;
16+ var expectedOutput = test . ExpectedOutput ;
1717
1818 if ( expectedResult != null )
1919 {
@@ -57,10 +57,17 @@ public class PackageTestReport
5757 }
5858
5959 if ( expectedOutput != null )
60- {
61- if ( ! expectedOutput . Matches ( runner . Output ) )
62- Errors . Add ( expectedOutput . Message ) ;
63- }
60+ {
61+ var output = runner . Output ;
62+ if ( output is not null )
63+ foreach ( var outputCheck in expectedOutput )
64+ {
65+ if ( ! outputCheck . Matches ( output ) )
66+ Errors . Add ( outputCheck . Message ) ;
67+ }
68+ else
69+ Errors . Add ( "No output was produced" ) ;
70+ }
6471 }
6572
6673 public PackageTestReport ( PackageTest test , int rc , IPackageTestRunner runner = null )
@@ -71,11 +78,12 @@ public class PackageTestReport
7178
7279 if ( rc != test . ExpectedReturnCode )
7380 Errors . Add ( $ " Expected: rc = { test . ExpectedReturnCode } But was: { rc } ") ;
74- else if ( test . OutputCheck != null )
75- {
76- if ( ! test . OutputCheck . Matches ( runner . Output ) )
77- Errors . Add ( test . OutputCheck . Message ) ;
78- }
81+ else if ( test . ExpectedOutput != null )
82+ foreach ( var outputCheck in test . ExpectedOutput )
83+ {
84+ if ( ! outputCheck . Matches ( runner . Output ) )
85+ Errors . Add ( outputCheck . Message ) ;
86+ }
7987 }
8088
8189 public PackageTestReport ( PackageTest test , Exception ex , IPackageTestRunner runner = null )
0 commit comments