This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,6 @@
|
|||
We can use our local libraries, in our documentation thanks to dune's mdx stanza:
|
||||
|
||||
```ocaml
|
||||
# Private_lib.x;;
|
||||
- : int = 42
|
||||
```
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(mdx
|
||||
(files README.md)
|
||||
(libraries private_lib))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(name private_lib)
|
||||
(modules private_lib))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let x = 42
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
Since 0.2 you can use the `libraries` field to have them linked into the test executable
|
||||
|
||||
$ cat >dune-project <<EOF
|
||||
> (lang dune 3.0)
|
||||
> (using mdx 0.2)
|
||||
> (cram disable)
|
||||
> EOF
|
||||
|
||||
$ dune runtest
|
||||
|
||||
MDX stanza 0.1 does not support linking libraries
|
||||
|
||||
$ cat >dune-project <<EOF
|
||||
> (lang dune 2.8)
|
||||
> (using mdx 0.1)
|
||||
> EOF
|
||||
|
||||
$ dune runtest
|
||||
File "dune", line 3, characters 1-24:
|
||||
3 | (libraries private_lib))
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Error: 'libraries' is only available since version 0.2 of mdx extension to
|
||||
verify code blocks in .md files. Please update your dune-project file to have
|
||||
(using mdx 0.2).
|
||||
[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue