Hello Mylib
Here we're making use of mdexp to keep the doc up to date. The code blocks below are extracted from an OCaml test file and their output is verified on every build.
Using libraries
We can make use of code defined in libraries in expect tests.
print_endline Mylib.hello_world;
[%expect {| Hello, World! |}];
Using Libraries in Toplevels
We can make use of code defined in libraries.
# print_endline Mylib.hello_world ;;
Hello, World!
- : unit = ()
Using Executables in Cram Style
We can make use of executables defined in packages.
$ mybin print
Hello, World!