Skip to content

Commit dacc470

Browse files
committed
add test report generation
1 parent 7dd1fac commit dacc470

File tree

3 files changed

+22056
-22946
lines changed

3 files changed

+22056
-22946
lines changed

src/test/java/org/greenbytes/http/sfv/AbstractSpecificationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void executeTest(StringBuilder out) {
229229
fail("should fail, but passed. Input >>>" + p.raw + "<<<, Output >>>" + parsed.serialize() + "<<<");
230230
} catch (ParseException expected) {
231231
out.append("~~~\n");
232-
out.append(expected.getDiagnostics()).append("\n");
232+
out.append(expected.getDiagnostics());
233233
out.append("~~~\n");
234234
out.append("\n");
235235
}

src/test/java/org/greenbytes/http/sfv/SpecificationTests.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,18 @@ public SpecificationTests(Object x, Object y) {
4444
@Test
4545
public void runTest() {
4646
StringBuilder out = new StringBuilder();
47+
if (basename.isEmpty()) {
48+
out.append("# Test Report\n");
49+
out.append("\n");
50+
}
4751
if (!p.filename.equals(basename)) {
4852
out.append("\n");
49-
out.append("# ").append(p.filename).append("\n");
53+
out.append("## ").append(p.filename).append("\n");
5054
out.append("\n");
5155
basename = p.filename;
5256
out.append("\n");
5357
}
54-
out.append("## ").append(p.name).append("\n");
58+
out.append("### ").append(p.name).append("\n");
5559
out.append("\n");
5660
out.append("Input:").append("\n");
5761
out.append("~~~" + "\n");

0 commit comments

Comments
 (0)