File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
test-src/nu/validator/htmlparser/test Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ public class EncodingTester {
3939
4040 protected static int SNIFFING_LIMIT = 16384 ;
4141
42+ private static int exitStatus = 0 ;
43+
4244 private final InputStream aggregateStream ;
4345
4446 private final StringBuilder builder = new StringBuilder ();
@@ -74,6 +76,7 @@ private boolean runTest() throws IOException, SAXException {
7476 Charset charset = reader .getCharset ();
7577 stream .close ();
7678 if (skipLabel ()) {
79+ exitStatus = 1 ;
7780 System .err .println ("Premature end of test data." );
7881 return false ;
7982 }
@@ -84,6 +87,7 @@ private boolean runTest() throws IOException, SAXException {
8487 case '\n' :
8588 break loop ;
8689 case -1 :
90+ exitStatus = 1 ;
8791 System .err .println ("Premature end of test data." );
8892 return false ;
8993 default :
@@ -96,6 +100,7 @@ private boolean runTest() throws IOException, SAXException {
96100 System .err .println ("Success." );
97101 // System.err.println(stream);
98102 } else {
103+ exitStatus = 1 ;
99104 System .err .println ("Failure. Expected: " + expected + " got "
100105 + sniffed + "." );
101106 System .err .println (stream );
@@ -158,6 +163,7 @@ public static void main(String[] args) throws Throwable {
158163 tester .runTests ();
159164 }
160165 }
166+ System .exit (exitStatus );
161167 }
162168
163169}
You can’t perform that action at this time.
0 commit comments