File tree 1 file changed +6
-0
lines changed
test-src/nu/validator/htmlparser/test
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ public class EncodingTester {
39
39
40
40
protected static int SNIFFING_LIMIT = 16384 ;
41
41
42
+ private static int exitStatus = 0 ;
43
+
42
44
private final InputStream aggregateStream ;
43
45
44
46
private final StringBuilder builder = new StringBuilder ();
@@ -74,6 +76,7 @@ private boolean runTest() throws IOException, SAXException {
74
76
Charset charset = reader .getCharset ();
75
77
stream .close ();
76
78
if (skipLabel ()) {
79
+ exitStatus = 1 ;
77
80
System .err .println ("Premature end of test data." );
78
81
return false ;
79
82
}
@@ -84,6 +87,7 @@ private boolean runTest() throws IOException, SAXException {
84
87
case '\n' :
85
88
break loop ;
86
89
case -1 :
90
+ exitStatus = 1 ;
87
91
System .err .println ("Premature end of test data." );
88
92
return false ;
89
93
default :
@@ -96,6 +100,7 @@ private boolean runTest() throws IOException, SAXException {
96
100
System .err .println ("Success." );
97
101
// System.err.println(stream);
98
102
} else {
103
+ exitStatus = 1 ;
99
104
System .err .println ("Failure. Expected: " + expected + " got "
100
105
+ sniffed + "." );
101
106
System .err .println (stream );
@@ -158,6 +163,7 @@ public static void main(String[] args) throws Throwable {
158
163
tester .runTests ();
159
164
}
160
165
}
166
+ System .exit (exitStatus );
161
167
}
162
168
163
169
}
You can’t perform that action at this time.
0 commit comments