Skip to content

Commit

Permalink
Fix tests about the output of alcotest (revert the controversial chan…
Browse files Browse the repository at this point in the history
…ge about the newline for pp_summary)
  • Loading branch information
dinosaure committed Oct 13, 2023
1 parent 7f3862d commit 4179b7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/alcotest-engine/core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ module Make (P : Platform.MAKER) (M : Monad.S) = struct
too. We don't need to register a channel even if the user specify its own
[Format.formatter] for [stdout] and/or [stderr]. *)
flush_all ();
Fmt.(pf (t.stderr :> Format.formatter))
"%a\n" red
"Invalid request (no tests to run, filter skipped everything)!";
Fmt.(pf (Global.get_stderr () :> Format.formatter)
"%a\n%!" red
"Invalid request (no tests to run, filter skipped everything)!");
exit 1)
else
let tests = filter_test_cases ~subst:true filter suite in
Expand Down
2 changes: 1 addition & 1 deletion src/alcotest-engine/pp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct
| 0 -> green_s ppf "Test Successful"
| n -> red ppf "%d failure%a!" n pp_plural n
in
Fmt.pf ppf "%a in %.3fs. %d test%a run.@\n" pp_failures r.failures r.time
Fmt.pf ppf "%a in %.3fs. %d test%a run.@," pp_failures r.failures r.time
r.success pp_plural r.success

let suite_results ~log_dir config ppf r =
Expand Down

0 comments on commit 4179b7d

Please sign in to comment.