Skip to content

Commit a9cdc43

Browse files
committed
Add a minimalist test case for the os_type label
1 parent e075e57 commit a9cdc43

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

test/bin/mdx-test/expect/dune.inc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,18 @@
371371
(alias runtest)
372372
(action (diff ocaml-errors-ellipsis/test-case.md ocaml-errors-ellipsis.actual)))
373373

374+
(rule
375+
(target os_type.actual)
376+
(deps (package mdx) (source_tree os_type))
377+
(action
378+
(with-stdout-to %{target}
379+
(chdir os_type
380+
(run ocaml-mdx test --output - test-case.md)))))
381+
382+
(rule
383+
(alias runtest)
384+
(action (diff os_type/test-case.md os_type.actual)))
385+
374386
(rule
375387
(target padding.actual)
376388
(deps (package mdx) (source_tree padding))
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Mdx can skip blocks based on `os_type`:
2+
3+
```ocaml os_type<>Win32
4+
# #require "unix"
5+
# Unix.nice 0
6+
- : int = 0
7+
```
8+
9+
```ocaml os_type=Win32
10+
# #require "unix"
11+
# Unix.nice 0
12+
Exception: Invalid_argument "Unix.nice not implemented".
13+
```

0 commit comments

Comments
 (0)