File tree Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,18 @@ let run () file section =
3434 | Mdx. Section _ | Text _ -> ()
3535 | Block b ->
3636 let b = Mdx.Block. eval b in
37- Log. debug (fun l -> l " pp: %a" Mdx.Block. dump b);
38- let pp_lines = Fmt. (list ~sep: (unit " \n " ) string ) in
39- let contents = Mdx.Block. executable_contents b in
40- match b.value with
41- | Toplevel _ -> Fmt. pr " %a\n " pp_lines contents
42- | OCaml ->
43- Fmt. pr " %a\n %a\n "
44- Mdx.Block. pp_line_directive (file, b.line)
45- pp_lines contents
46- | _ -> ()
37+ if not (Mdx.Block. skip b) then (
38+ Log. debug (fun l -> l " pp: %a" Mdx.Block. dump b);
39+ let pp_lines = Fmt. (list ~sep: (unit " \n " ) string ) in
40+ let contents = Mdx.Block. executable_contents b in
41+ match b.value with
42+ | Toplevel _ -> Fmt. pr " %a\n " pp_lines contents
43+ | OCaml ->
44+ Fmt. pr " %a\n %a\n "
45+ Mdx.Block. pp_line_directive (file, b.line)
46+ pp_lines contents
47+ | _ -> ()
48+ )
4749 ) t;
4850 0
4951
Original file line number Diff line number Diff line change @@ -40,3 +40,11 @@ let () = print_endline (string_of_int x)
4040 # print_endline "42";;
4141 42
4242```
43+
44+ ## Skipped blocks
45+
46+ This block should not be executed by the tests:
47+
48+ ``` ocaml skip
49+ let () = assert false
50+ ```
Original file line number Diff line number Diff line change @@ -50,3 +50,11 @@ let () = print_endline (string_of_int x)
5050 # print_endline "42";;
5151 42
5252```
53+
54+ ## Skipped blocks
55+
56+ This block should not be executed by the tests:
57+
58+ ```ocaml skip
59+ let () = assert false
60+ ```
You can’t perform that action at this time.
0 commit comments