@@ -287,7 +287,7 @@ let run_exn ~non_deterministic ~silent_eval ~record_backtrace ~syntax ~silent
287287
288288 let test_block ~ppf ~temp_file t =
289289 let print_block () = Block. pp ?syntax ppf t in
290- if Block. is_active ?section t then
290+ if Block. is_active ?section t then (
291291 match Block. value t with
292292 | Raw _ -> print_block ()
293293 | Include { file_included; file_kind = Fk_ocaml { part_included } } ->
@@ -317,30 +317,31 @@ let run_exn ~non_deterministic ~silent_eval ~record_backtrace ~syntax ~silent
317317 ~det: (fun () ->
318318 run_cram_tests ?syntax t ?root ppf temp_file pad tests)
319319 | Toplevel { non_det; env } ->
320- let tests =
320+ let phrases =
321321 let syntax = Util.Option. value syntax ~default: Normal in
322322 Toplevel. of_lines ~syntax ~loc: t.loc t.contents
323323 in
324+ Deprecated.Missing_double_semicolon. check_block phrases;
324325 with_non_det non_deterministic non_det ~command: print_block
325326 ~output: (fun () ->
326327 assert (syntax <> Some Cram );
327328 print_block () ;
328329 List. iter
329- (fun (test : Toplevel.t ) ->
330+ (fun (phrase : Toplevel.t ) ->
330331 match
331332 Mdx_top. in_env env (fun () ->
332- eval_test ~block: t ?root c test .command)
333+ eval_test ~block: t ?root c phrase .command)
333334 with
334335 | Ok _ -> ()
335336 | Error e ->
336337 let output = List. map (fun l -> `Output l) e in
337- if Output. equal test .output output then ()
338- else err_eval ~cmd: test .command e)
339- tests )
338+ if Output. equal phrase .output output then ()
339+ else err_eval ~cmd: phrase .command e)
340+ phrases )
340341 ~det: (fun () ->
341342 assert (syntax <> Some Cram );
342343 Mdx_top. in_env env (fun () ->
343- run_toplevel_tests ?syntax ?root c ppf tests t ))
344+ run_toplevel_tests ?syntax ?root c ppf phrases t) ))
344345 else print_block ()
345346 in
346347 let gen_corrected file_contents items =
@@ -364,6 +365,7 @@ let run_exn ~non_deterministic ~silent_eval ~record_backtrace ~syntax ~silent
364365 try test_block ~ppf ~temp_file t
365366 with Failure msg -> raise (Test_block_failure (t, msg))))
366367 items;
368+ Deprecated.Missing_double_semicolon. report ~filename: file;
367369 Format. pp_print_flush ppf () ;
368370 Buffer. contents buf
369371 in
0 commit comments