Commits

Thomas Pelletier committed 2f644b8 Draft

Fix the case when the last test is a failure

Comments (0)

Files changed (1)

 		case line == "FAIL":
 			// Handle the edge case of the last test failing: the
 			// following line will be "FAIL", so we just stop there.
-			tests = append(tests, test)
+			if test != nil {
+				tests = append(tests, test)
+			}
 			test = nil
 		default:
 			if test != nil { // test != nil marks we're in the middle of a test
 		}
 	}
 
+	panic(tests)
+
 	return tests, nil
 }