tangled
alpha
login
or
join now
anil.recoil.org
/
ocaml-html5rw
1
fork
atom
OCaml HTML5 parser/serialiser based on Python's JustHTML
1
fork
atom
overview
issues
pulls
pipelines
more
anil.recoil.org
2 months ago
be2d15a8
5fc4a3c7
+34
2 changed files
expand all
collapse all
unified
split
.gitignore
test
test_validator.ml
+1
.gitignore
···
16
16
# Opam local switch
17
17
_opam/
18
18
*.html
19
19
+
validator
+33
test/test_validator.ml
···
302
302
Printf.printf "Running tests...\n%!";
303
303
let results = List.map (run_test messages) tests in
304
304
305
305
+
(* Print failing isvalid tests *)
306
306
+
let failing_isvalid = List.filter (fun r ->
307
307
+
r.file.expected = Valid && not r.passed
308
308
+
) results in
309
309
+
if failing_isvalid <> [] then begin
310
310
+
Printf.printf "\n=== Failing isvalid tests ===\n";
311
311
+
List.iter (fun r ->
312
312
+
Printf.printf "%s: %s\n" r.file.relative_path r.details
313
313
+
) failing_isvalid
314
314
+
end;
315
315
+
316
316
+
(* Print failing haswarn tests *)
317
317
+
let failing_haswarn = List.filter (fun r ->
318
318
+
r.file.expected = HasWarning && not r.passed
319
319
+
) results in
320
320
+
if failing_haswarn <> [] then begin
321
321
+
Printf.printf "\n=== Failing haswarn tests ===\n";
322
322
+
List.iter (fun r ->
323
323
+
Printf.printf "%s\n" r.file.relative_path
324
324
+
) failing_haswarn
325
325
+
end;
326
326
+
327
327
+
(* Print failing novalid tests *)
328
328
+
let failing_novalid = List.filter (fun r ->
329
329
+
r.file.expected = Invalid && not r.passed
330
330
+
) results in
331
331
+
if failing_novalid <> [] then begin
332
332
+
Printf.printf "\n=== Failing novalid tests (first 50) ===\n";
333
333
+
List.iteri (fun i r ->
334
334
+
if i < 50 then Printf.printf "%s\n" r.file.relative_path
335
335
+
) failing_novalid
336
336
+
end;
337
337
+
305
338
print_summary results;
306
339
generate_html_report results report_path;
307
340