2026-03-19 08:06.59: New job: test realworldocaml/mdx https://github.com/realworldocaml/mdx.git#refs/heads/main (5c97b27cf8723d87fd00d350b75e7f32f021c8d6) (windows-x86_64:windows-server-mingw-ltsc2025-5.4_opam-2.5)
Base: ocaml/opam:windows-server-mingw-ltsc2025-ocaml-5.4@sha256:fedecf8e7810af08d566e6e877bd4ed7ad4c107b8cc32164f71632fffceb8869
Opam project build
To reproduce locally:
git clone --recursive "https://github.com/realworldocaml/mdx.git" -b "main" && cd "mdx" && git reset --hard 5c97b27c
cat > Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:windows-server-mingw-ltsc2025-ocaml-5.4@sha256:fedecf8e7810af08d566e6e877bd4ed7ad4c107b8cc32164f71632fffceb8869
# windows-server-mingw-ltsc2025-5.4_opam-2.5
USER 1000:1000
ENV CLICOLOR_FORCE="1"
ENV OPAMCOLOR="always"
RUN ln -f /usr/local/bin/opam-2.5 /usr/local/bin/opam
RUN opam init --reinit -ni
RUN uname -rs && opam exec -- ocaml -version && opam --version
RUN cd ~/opam-repository && (git cat-file -e 9f189ca4f94fbb5f0045820bf3c4ffafb21145ef || git fetch origin master) && git reset -q --hard 9f189ca4f94fbb5f0045820bf3c4ffafb21145ef && git log --no-decorate -n1 --oneline && opam update -u
COPY --chown=1000:1000 mdx.opam /cygwin64/home/opam/src/./
RUN opam pin add -yn mdx.dev '/cygwin64/home/opam/src/./'
RUN echo '(lang dune 3.0)' > '/home/opam/src/./dune-project'
ENV DEPS="alcotest.1.9.1 arch-x86_64.1 astring.0.8.5 base-bigarray.base base-bytes.base base-domains.base base-effects.base base-nnp.base base-threads.base base-unix.base camlp-streams.5.0.1 cmdliner.2.1.0 conf-mingw-w64-gcc-x86_64.1 cppo.1.8.0 csexp.1.5.2 dune.3.22.0 dune-configurator.3.22.0 flexdll.0.44 fmt.0.11.0 host-arch-x86_64.1 host-system-mingw.1 logs.0.10.0 lwt.6.1.1 mingw-w64-shims.0.2.0 ocaml.5.4.0 ocaml-base-compiler.5.4.0 ocaml-compiler.5.4.0 ocaml-config.3 ocaml-env-mingw64.1 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml-version.4.0.3 ocamlbuild.0.16.1 ocamlfind.1.9.8 ocplib-endian.1.2 re.1.14.0 result.1.5 stdlib-shims.0.3.0 system-mingw.1 topkg.1.1.1 uutf.1.0.4"
ENV CI="true"
ENV OCAMLCI="true"
RUN opam update --depexts && opam install --cli=2.5 --depext-only -y mdx.dev $DEPS
RUN opam install $DEPS
COPY --chown=1000:1000 . /cygwin64/home/opam/src
RUN cd /home/opam/src && opam exec -- dune build @install @check @runtest && rm -rf _build
END-OF-DOCKERFILE
docker build .
END-REPRO-BLOCK
2026-03-19 08:06.59: Using cache hint "realworldocaml/mdx-ocaml/opam:windows-server-mingw-ltsc2025-ocaml-5.4@sha256:fedecf8e7810af08d566e6e877bd4ed7ad4c107b8cc32164f71632fffceb8869-windows-server-mingw-ltsc2025-5.4_opam-2.5-708691563bd9e4573c3c2b87f4a56a0d"
2026-03-19 08:06.59: Using OBuilder spec:
((from ocaml/opam:windows-server-mingw-ltsc2025-ocaml-5.4@sha256:fedecf8e7810af08d566e6e877bd4ed7ad4c107b8cc32164f71632fffceb8869)
(comment windows-server-mingw-ltsc2025-5.4_opam-2.5)
(user (uid 1000) (gid 1000))
(env CLICOLOR_FORCE 1)
(env OPAMCOLOR always)
(run (shell "ln -f /usr/local/bin/opam-2.5 /usr/local/bin/opam"))
(run (shell "opam init --reinit -ni"))
(run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
(run (cache (opam-archives (target "c:\\opam\\.opam\\download-cache")))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e 9f189ca4f94fbb5f0045820bf3c4ffafb21145ef || git fetch origin master) && git reset -q --hard 9f189ca4f94fbb5f0045820bf3c4ffafb21145ef && git log --no-decorate -n1 --oneline && opam update -u"))
(copy (src mdx.opam) (dst /cygwin64/home/opam/src/./))
(run (network host)
(shell "opam pin add -yn mdx.dev '/cygwin64/home/opam/src/./'"))
(run (shell "echo '(lang dune 3.0)' > '/home/opam/src/./dune-project'"))
(env DEPS "alcotest.1.9.1 arch-x86_64.1 astring.0.8.5 base-bigarray.base base-bytes.base base-domains.base base-effects.base base-nnp.base base-threads.base base-unix.base camlp-streams.5.0.1 cmdliner.2.1.0 conf-mingw-w64-gcc-x86_64.1 cppo.1.8.0 csexp.1.5.2 dune.3.22.0 dune-configurator.3.22.0 flexdll.0.44 fmt.0.11.0 host-arch-x86_64.1 host-system-mingw.1 logs.0.10.0 lwt.6.1.1 mingw-w64-shims.0.2.0 ocaml.5.4.0 ocaml-base-compiler.5.4.0 ocaml-compiler.5.4.0 ocaml-config.3 ocaml-env-mingw64.1 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml-version.4.0.3 ocamlbuild.0.16.1 ocamlfind.1.9.8 ocplib-endian.1.2 re.1.14.0 result.1.5 stdlib-shims.0.3.0 system-mingw.1 topkg.1.1.1 uutf.1.0.4")
(env CI true)
(env OCAMLCI true)
(run (cache (opam-archives (target "c:\\opam\\.opam\\download-cache")))
(network host)
(shell "opam update --depexts && opam install --cli=2.5 --depext-only -y mdx.dev $DEPS"))
(run (cache (opam-archives (target "c:\\opam\\.opam\\download-cache")))
(network host)
(shell "opam install $DEPS"))
(copy (src .) (dst /cygwin64/home/opam/src))
(run (shell "cd /home/opam/src && opam exec -- dune build @install @check @runtest && rm -rf _build"))
)
2026-03-19 08:06.59: Waiting for resource in pool OCluster
2026-03-19 21:10.16: Waiting for worker…
2026-03-20 08:21.27: Got resource from pool OCluster
Building on ltsc2025-2
All commits already cached
HEAD is now at 5c97b27 Merge pull request #472 from jonludlam/release-2.5.1
(from ocaml/opam:windows-server-mingw-ltsc2025-ocaml-5.4@sha256:fedecf8e7810af08d566e6e877bd4ed7ad4c107b8cc32164f71632fffceb8869)
2026-03-20 08:21.37 ---> using "a21c3d6a5c8ade59b5718498d4946f2d30bc2f15b3081890bc8673cc20de69f7" from cache
C:/: (comment windows-server-mingw-ltsc2025-5.4_opam-2.5)
C:/: (user (uid 1000) (gid 1000))
C:/: (env CLICOLOR_FORCE 1)
C:/: (env OPAMCOLOR always)
C:/: (run (shell "ln -f /usr/local/bin/opam-2.5 /usr/local/bin/opam"))
2026-03-20 08:21.37 ---> using "ba707ce1f62b585e8ecb40306d921206316b14fded440e6c49f33aa7897cc9c7" from cache
C:/: (run (shell "opam init --reinit -ni"))
No configuration file found, using built-in defaults.
<><> Unix support infrastructure ><><><><><><><><><><><><><><><><><><><><><><><>
opam and the OCaml ecosystem in general require various Unix tools in order to operate correctly. At present, this requires the installation of Cygwin to provide these tools.
How should opam obtain Unix tools?
> 1. Use tools found in PATH (Cygwin installation at C:\cygwin64)
2. Automatically create an internal Cygwin installation that will be managed by opam (recommended)
3. Use Cygwin installation found in C:\cygwin64
4. Use another existing Cygwin/MSYS2 installation
5. Abort initialisation
[1/2/3/4/5] 1
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg command on your system.
- you won't be able to use darcs repositories unless you install the darcs command on your system.
<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
2026-03-20 08:21.37 ---> using "dd67e9cc18682a923590cd564dd7cd6177b4afe1c25b1d53bacf8ae6b5b2364f" from cache
C:/: (run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
CYGWIN_NT-10.0-26100 3.6.6-1.x86_64
The OCaml toplevel, version 5.4.0
2.5.0
2026-03-20 08:21.37 ---> using "c97059ecb6d76caa6ea35cf8e41cecaa775dc323c43ea7e5cc23418742ce7876" from cache
C:/: (run (cache (opam-archives (target "c:\\opam\\.opam\\download-cache")))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e 9f189ca4f94fbb5f0045820bf3c4ffafb21145ef || git fetch origin master) && git reset -q --hard 9f189ca4f94fbb5f0045820bf3c4ffafb21145ef && git log --no-decorate -n1 --oneline && opam update -u"))
From https://github.com/ocaml/opam-repository
* branch master -> FETCH_HEAD
b820e8c25e..9f189ca4f9 master -> origin/master
9f189ca4f9 Merge pull request #29562 from shonfeder/release-dune-3.22.0
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] synchronised from git+file://C:/cygwin64/home/opam/opam-repository
Everything as up-to-date as possible (run with --verbose to show unavailable upgrades).
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade ocaml.5.5.0"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
# To update the current shell environment, run: eval $(opam env)
2026-03-20 08:21.37 ---> using "ced7f83c95757ead588801f972f0887e8eaeeba3e8859b2fa40215950a6457f6" from cache
C:/: (copy (src mdx.opam) (dst /cygwin64/home/opam/src/./))
2026-03-20 08:21.37 ---> using "ddf1c3f9eb69a9e0491cd6b49cf0e7f4ef712efaeb582003e7b135ba72bd5f5d" from cache
C:/: (run (network host)
(shell "opam pin add -yn mdx.dev '/cygwin64/home/opam/src/./'"))
[mdx.dev] synchronised (file://C:/cygwin64/home/opam/src)
mdx is now pinned to file://C:/cygwin64/home/opam/src (version dev)
2026-03-20 08:21.37 ---> using "b5a518e885d86b5a2405e64842cbfa3196b59c4239b0cc9d12b27bff17648907" from cache
C:/: (run (shell "echo '(lang dune 3.0)' > '/home/opam/src/./dune-project'"))
2026-03-20 08:21.37 ---> using "f00cc6e9300519818a9f70069ed60362b22b3e6d66aac7adaf71521229d9be69" from cache
C:/: (env DEPS "alcotest.1.9.1 arch-x86_64.1 astring.0.8.5 base-bigarray.base base-bytes.base base-domains.base base-effects.base base-nnp.base base-threads.base base-unix.base camlp-streams.5.0.1 cmdliner.2.1.0 conf-mingw-w64-gcc-x86_64.1 cppo.1.8.0 csexp.1.5.2 dune.3.22.0 dune-configurator.3.22.0 flexdll.0.44 fmt.0.11.0 host-arch-x86_64.1 host-system-mingw.1 logs.0.10.0 lwt.6.1.1 mingw-w64-shims.0.2.0 ocaml.5.4.0 ocaml-base-compiler.5.4.0 ocaml-compiler.5.4.0 ocaml-config.3 ocaml-env-mingw64.1 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml-version.4.0.3 ocamlbuild.0.16.1 ocamlfind.1.9.8 ocplib-endian.1.2 re.1.14.0 result.1.5 stdlib-shims.0.3.0 system-mingw.1 topkg.1.1.1 uutf.1.0.4")
C:/: (env CI true)
C:/: (env OCAMLCI true)
C:/: (run (cache (opam-archives (target "c:\\opam\\.opam\\download-cache")))
(network host)
(shell "opam update --depexts && opam install --cli=2.5 --depext-only -y mdx.dev $DEPS"))
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[mdx.dev] synchronised (file://C:/cygwin64/home/opam/src)
[NOTE] Package system-mingw is already installed (current version is 1).
[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-env-mingw64 is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 3).
[NOTE] Package ocaml-compiler is already installed (current version is 5.4.0).
[NOTE] Package ocaml-base-compiler is already installed (current version is 5.4.0).
[NOTE] Package ocaml is already installed (current version is 5.4.0).
[NOTE] Package mingw-w64-shims is already installed (current version is 0.2.0).
[NOTE] Package host-system-mingw is already installed (current version is 1).
[NOTE] Package host-arch-x86_64 is already installed (current version is 1).
[NOTE] Package flexdll is already installed (current version is 0.44).
[NOTE] Package conf-mingw-w64-gcc-x86_64 is already installed (current version is 1).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-nnp is already installed (current version is base).
[NOTE] Package base-effects is already installed (current version is base).
[NOTE] Package base-domains is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).
[NOTE] Package arch-x86_64 is already installed (current version is 1).
# To update the current shell environment, run: eval $(opam env)
2026-03-20 08:21.37 ---> using "c8405f60a5af425446bc22d25c0177cfd94dfb553a82b4c58fe82411a0042b86" from cache
C:/: (run (cache (opam-archives (target "c:\\opam\\.opam\\download-cache")))
(network host)
(shell "opam install $DEPS"))
[NOTE] Package system-mingw is already installed (current version is 1).
[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-env-mingw64 is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 3).
[NOTE] Package ocaml-compiler is already installed (current version is 5.4.0).
[NOTE] Package ocaml-base-compiler is already installed (current version is 5.4.0).
[NOTE] Package ocaml is already installed (current version is 5.4.0).
[NOTE] Package mingw-w64-shims is already installed (current version is 0.2.0).
[NOTE] Package host-system-mingw is already installed (current version is 1).
[NOTE] Package host-arch-x86_64 is already installed (current version is 1).
[NOTE] Package flexdll is already installed (current version is 0.44).
[NOTE] Package conf-mingw-w64-gcc-x86_64 is already installed (current version is 1).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-nnp is already installed (current version is base).
[NOTE] Package base-effects is already installed (current version is base).
[NOTE] Package base-domains is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).
[NOTE] Package arch-x86_64 is already installed (current version is 1).
The following actions will be performed:
=== install 22 packages
- install alcotest 1.9.1
- install astring 0.8.5
- install base-bytes base
- install camlp-streams 5.0.1
- install cmdliner 2.1.0
- install cppo 1.8.0
- install csexp 1.5.2
- install dune 3.22.0
- install dune-configurator 3.22.0
- install fmt 0.11.0
- install logs 0.10.0
- install lwt 6.1.1
- install ocaml-syntax-shims 1.0.0
- install ocaml-version 4.0.3
- install ocamlbuild 0.16.1
- install ocamlfind 1.9.8
- install ocplib-endian 1.2
- install re 1.14.0
- install result 1.5
- install stdlib-shims 0.3.0
- install topkg 1.1.1
- install uutf 1.0.4
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved alcotest.1.9.1 (cached)
-> retrieved astring.0.8.5 (cached)
-> retrieved camlp-streams.5.0.1 (cached)
-> retrieved cmdliner.2.1.0 (cached)
-> retrieved cppo.1.8.0 (cached)
-> retrieved csexp.1.5.2 (cached)
-> retrieved fmt.0.11.0 (cached)
-> retrieved logs.0.10.0 (cached)
-> retrieved ocaml-syntax-shims.1.0.0 (cached)
-> retrieved lwt.6.1.1 (cached)
-> retrieved ocaml-version.4.0.3 (cached)
-> retrieved ocamlbuild.0.16.1 (cached)
-> retrieved ocamlfind.1.9.8 (cached)
-> retrieved ocplib-endian.1.2 (cached)
-> retrieved re.1.14.0 (cached)
-> retrieved result.1.5 (cached)
-> retrieved stdlib-shims.0.3.0 (cached)
-> retrieved topkg.1.1.1 (cached)
-> retrieved uutf.1.0.4 (cached)
-> retrieved dune.3.22.0, dune-configurator.3.22.0 (cached)
-> installed cmdliner.2.1.0
-> installed ocamlbuild.0.16.1
[WARNING] .install file is missing .exe extension for src/findlib/ocamlfind
[WARNING] .install file is missing .exe extension for src/findlib/ocamlfind_opt
[WARNING] Automatically adding .exe to C:\opam\.opam\5.4\.opam-switch\build\ocamlfind.1.9.8\src\findlib\ocamlfind.exe
[WARNING] Automatically adding .exe to C:\opam\.opam\5.4\.opam-switch\build\ocamlfind.1.9.8\src\findlib\ocamlfind_opt.exe
[WARNING] C:\opam\.opam\5.4\bin\safe_camlp4 is a script; the command won't be available
-> installed ocamlfind.1.9.8
-> installed base-bytes.base
-> installed topkg.1.1.1
-> installed uutf.1.0.4
-> installed fmt.0.11.0
-> installed astring.0.8.5
-> installed dune.3.22.0
-> installed csexp.1.5.2
-> installed camlp-streams.5.0.1
-> installed cppo.1.8.0
-> installed ocaml-syntax-shims.1.0.0
-> installed ocaml-version.4.0.3
-> installed re.1.14.0
-> installed ocplib-endian.1.2
-> installed result.1.5
-> installed stdlib-shims.0.3.0
-> installed dune-configurator.3.22.0
-> installed alcotest.1.9.1
-> installed lwt.6.1.1
-> installed logs.0.10.0
Done.
# To update the current shell environment, run: eval $(opam env)
2026-03-20 08:21.37 ---> using "7f7d67d9dbd0e79cb560b3d59a44fb36d25144bae8ac7a3ed97ca6760430ddcf" from cache
C:/: (copy (src .) (dst /cygwin64/home/opam/src))
2026-03-20 08:23.41 ---> saved as "c2377459be110580cd3770e11cb09abdb114d448578c6a5ec4de6d6e41ed675c"
C:/: (run (shell "cd /home/opam/src && opam exec -- dune build @install @check @runtest && rm -rf _build"))
(cd _build/default/test/bin/mdx-test/expect/casual-file-inc && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/casual-file-inc.actual
File "test-case.md", lines 4-6: Error in the file include code block
casual-file.txt
: Invalid argument
File "test/bin/mdx-test/misc/non-det-env-var/dune", lines 1-9, characters 0-188:
1 | (rule
2 | (target test-case.md.corrected)
3 | (deps
4 | (package mdx))
5 | (action
6 | (setenv
7 | MDX_RUN_NON_DETERMINISTIC
8 | true
9 | (run ocaml-mdx test --force-output %{dep:test-case.md}))))
(cd _build/default/test/bin/mdx-test/misc/non-det-env-var && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --force-output test-case.md)
[mdx] Fatal error: File "test-case.md", lines 4-7: invalid code block: `non-deterministic
` is not a valid label.
File "test/bin/mdx-test/expect/dune.inc", lines 50-56, characters 0-192:
50 | (rule
51 | (target cram.actual)
52 | (deps (package mdx) (source_tree cram))
53 | (action
54 | (with-stdout-to %{target}
55 | (chdir cram
56 | (run ocaml-mdx test --output - --syntax=cram test-case.t)))))
(cd _build/default/test/bin/mdx-test/expect/cram && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - --syntax=cram test-case.t) > _build/default/test/bin/mdx-test/expect/cram.actual
[mdx] Fatal error: File "test-case.t", line 8: Failure("lexing: empty token")
File "test/bin/mdx-test/expect/dune.inc", lines 134-140, characters 0-227:
134 | (rule
135 | (target environment-variable.actual)
136 | (deps (package mdx) (source_tree environment-variable))
137 | (action
138 | (with-stdout-to %{target}
139 | (chdir environment-variable
140 | (run ocaml-mdx test --output - test-case.md)))))
(cd _build/default/test/bin/mdx-test/expect/environment-variable && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/environment-variable.actual
ocaml-mdx-test: internal error, uncaught exception:
End_of_file
File "test/bin/mdx-test/expect/dune.inc", lines 146-152, characters 0-239:
146 | (rule
147 | (target environment-variable-set.actual)
148 | (deps (package mdx) (source_tree environment-variable-set))
149 | (action
150 | (with-stdout-to %{target}
151 | (chdir environment-variable-set
152 | (run ocaml-mdx test --output - test-case.md)))))
(cd _build/default/test/bin/mdx-test/expect/environment-variable-set && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/environment-variable-set.actual
ocaml-mdx-test: internal error, uncaught exception:
End_of_file
(cd _build/default/test/bin/mdx-test/expect/labels-syntax-mli && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - --syntax=mli test-case.mli) > _build/default/test/bin/mdx-test/expect/labels-syntax-mli.actual
File "_none_", lines 18-21: Error in the cram code block
Blocks must start with a command or similar, not with an output line. Please, make sure that there's no spare empty line, particularly between the output and its input.
File "test/bin/mdx-test/expect/dune.inc", lines 326-332, characters 0-242:
326 | (rule
327 | (target non-det-default-preserved.actual)
328 | (deps (package mdx) (source_tree non-det-default-preserved))
329 | (action
330 | (with-stdout-to %{target}
331 | (chdir non-det-default-preserved
332 | (run ocaml-mdx test --output - test-case.md)))))
(cd _build/default/test/bin/mdx-test/expect/non-det-default-preserved && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/non-det-default-preserved.actual
[mdx] Fatal error: File "test-case.md", lines 4-7: invalid code block: `non-deterministic
` is not a valid label.
(cd _build/default/test/bin/mdx-test/expect/multilines-mli && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.mli) > _build/default/test/bin/mdx-test/expect/multilines-mli.actual
File "_none_", lines 7-14: Error in the cram code block
Blocks must start with a command or similar, not with an output line. Please, make sure that there's no spare empty line, particularly between the output and its input.
File "test/bin/mdx-test/expect/dune.inc", lines 314-320, characters 0-188:
314 | (rule
315 | (target non-det.actual)
316 | (deps (package mdx) (source_tree non-det))
317 | (action
318 | (with-stdout-to %{target}
319 | (chdir non-det
320 | (run ocaml-mdx test --output - test-case.md)))))
(cd _build/default/test/bin/mdx-test/expect/non-det && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/non-det.actual
[mdx] Fatal error: File "test-case.md", lines 12-53: invalid code block: "output\r" is not a valid value for label `non-deterministic`. Valid values are <none>, "command" and "output".
(cd _build/default/test/bin/mdx-test/expect/parts-begin-end && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/parts-begin-end.actual
File "test-case.md", lines 4-36: Error in the OCaml file include code block
Cannot find part "toto\r" in .\parts-begin-end.ml
(cd _build/default/test/bin/mdx-test/expect/shell-file-inc && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/shell-file-inc.actual
File "test-case.md", lines 4-6: Error in the file include code block
script.sh
: Invalid argument
(cd _build/default/test/bin/mdx-test/expect/sync-from-subdir && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/sync-from-subdir.actual
File "test-case.md", lines 3-5: Error in the OCaml file include code block
Cannot find part "1\r" in .\some_dir/some_module.ml
(cd _build/default/test/bin/mdx-test/expect/simple-mli && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - --syntax=mli test-case.mli) > _build/default/test/bin/mdx-test/expect/simple-mli.actual
File "_none_", lines 33-36: Error in the cram code block
Blocks must start with a command or similar, not with an output line. Please, make sure that there's no spare empty line, particularly between the output and its input.
(cd _build/default/test/bin/mdx-test/expect/simple-mld && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - --syntax=mld test-case.mld) > _build/default/test/bin/mdx-test/expect/simple-mld.actual
File "_none_", lines 31-34: Error in the cram code block
Blocks must start with a command or similar, not with an output line. Please, make sure that there's no spare empty line, particularly between the output and its input.
(cd _build/default/test/bin/mdx-test/expect/sync-to-md && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test --output - test-case.md) > _build/default/test/bin/mdx-test/expect/sync-to-md.actual
File "test-case.md", lines 4-36: Error in the OCaml file include code block
Cannot find part "toto\r" in .\sync_to_md.ml
File "test/bin/mdx-test/failure/dune.inc", lines 2-9, characters 0-244:
2 | (rule
3 | (target block-locations.actual)
4 | (deps (package mdx) (source_tree block-locations))
5 | (action
6 | (with-accepted-exit-codes 1
7 | (with-outputs-to %{target}
8 | (chdir block-locations
9 | (run %{bin:ocaml-mdx} test test-case.md))))))
(cd _build/default/test/bin/mdx-test/failure/block-locations && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test test-case.md) &> _build/default/test/bin/mdx-test/failure/block-locations.actual
Command exited with code 0.
File "test/bin/mdx-test/failure/dune.inc", lines 121-128, characters 0-244:
121 | (rule
122 | (target multiple-errors.actual)
123 | (deps (package mdx) (source_tree multiple-errors))
124 | (action
125 | (with-accepted-exit-codes 1
126 | (with-outputs-to %{target}
127 | (chdir multiple-errors
128 | (run %{bin:ocaml-mdx} test test-case.md))))))
(cd _build/default/test/bin/mdx-test/failure/multiple-errors && ..\..\..\..\..\..\install\default\bin\ocaml-mdx.exe test test-case.md) &> _build/default/test/bin/mdx-test/failure/multiple-errors.actual
Command exited with code 0.
File "test/bin/mdx-pp/expect/spaces/test_case.ml.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-pp/expect/spaces/test_case.ml.expected _build/default/test/bin/mdx-pp/expect/spaces.actual
diff --git a/_build/default/test/bin/mdx-pp/expect/spaces/test_case.ml.expected b/_build/default/test/bin/mdx-pp/expect/spaces.actual
index 809cdbd..e69de29 100755
--- a/_build/default/test/bin/mdx-pp/expect/spaces/test_case.ml.expected
+++ b/_build/default/test/bin/mdx-pp/expect/spaces.actual
@@ -1,16 +0,0 @@
-#7 "test-case.md"
-
-
-let x =
-
- 5
-
-;;
-#15 "test-case.md"
- let x = 1
-
- in x;;
-#21 "test-case.md"
- 3;;
-#25 "test-case.md"
- Printf.printf "foo\n\nbar\n";;
File "test/bin/mdx-pp/expect/section-option/test_case.ml.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-pp/expect/section-option/test_case.ml.expected _build/default/test/bin/mdx-pp/expect/section-option.actual
diff --git a/_build/default/test/bin/mdx-pp/expect/section-option/test_case.ml.expected b/_build/default/test/bin/mdx-pp/expect/section-option.actual
index b099cbd..e69de29 100755
--- a/_build/default/test/bin/mdx-pp/expect/section-option/test_case.ml.expected
+++ b/_build/default/test/bin/mdx-pp/expect/section-option.actual
@@ -1,6 +0,0 @@
-#7 "test-case.md"
-let msg0 = "I should be in the .ml file!"
-;;
-#13 "test-case.md"
-let msg1 = "Me too!"
-;;
File "test/bin/mdx-pp/expect/toplevel/test_case.ml.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-pp/expect/toplevel/test_case.ml.expected _build/default/test/bin/mdx-pp/expect/toplevel.actual
diff --git a/_build/default/test/bin/mdx-pp/expect/toplevel/test_case.ml.expected b/_build/default/test/bin/mdx-pp/expect/toplevel.actual
index 6361d72..e69de29 100755
--- a/_build/default/test/bin/mdx-pp/expect/toplevel/test_case.ml.expected
+++ b/_build/default/test/bin/mdx-pp/expect/toplevel.actual
@@ -1,2 +0,0 @@
-#5 "test-case.md"
- print_endline "hello";;
(cd _build/default/test/lib && .\test_mdx_lib.exe)
Testing `Mdx'.
This run has ID `QTHRM9YA'.
[OK] Block 0 Header.infer_from_file: "".
[OK] Block 1 Header.infer_from_file: "foo".
[OK] Block 2 Header.infer_from_file: "foo.bar".
[OK] Block 3 Header.infer_from_file: "dune".
[OK] Block 4 Header.infer_from_file: "dune-project".
[OK] Block 5 Header.infer_from_file: "foo.sh".
[OK] Block 6 Header.infer_from_file: "foo/foo/foo.ml".
[OK] Block 7 mk: "invalid ocaml".
[OK] Block 8 mk: "invalid toplevel".
[OK] Label 0 raw_parse: "".
[OK] Label 1 raw_parse: "foo=".
[OK] Label 2 raw_parse: "foo<>bar".
[OK] Label 3 raw_parse: "<bar".
[OK] Label 4 raw_parse: "foo<=bar".
[OK] Label 5 raw_parse: "foo>bar".
[OK] Label 6 raw_parse: ">=".
[OK] Label 7 raw_parse: "FOO_BAR=foo_bar".
[OK] Label 8 interpret: "".
[OK] Label 9 interpret: "foo".
[OK] Label 10 interpret: "skip".
[OK] Label 11 interpret: "skip".
[OK] Label 12 interpret: "version".
[OK] Label 13 interpret: "non-deterministic".
[OK] Label 14 interpret: "dir".
[OK] Label 15 interpret: "set-foo".
[OK] Label 16 of_string: "".
[OK] Label 17 of_string: ",".
[OK] Label 18 of_string: "skip,".
[OK] Label 19 of_string: "skip,file=foo.ml".
[OK] Dep 0 of_block: "Empty".
[OK] Dep 1 of_block: "file:toto.ml".
[OK] Dep 2 of_block: "dir:tata/".
[OK] Dep 3 of_block: "dir=tata/,skip".
[OK] Dep 4 of_line: "block: file=tikitaka.ml".
[OK] Dep 5 of_line: "skip + file + dir".
[OK] Dep 6 to_sexp: file.
[OK] Dep 7 to_sexp: dir.
[OK] Syntax 0 infer: "".
[OK] Syntax 1 infer: "test.md".
[OK] Syntax 2 infer: "test.t".
[OK] Syntax 3 infer: "test.ml".
[OK] Syntax 4 infer: "test.mli".
[OK] Syntax 5 infer: "no_ext".
[OK] Util 0 String.english_conjonction: single.
[OK] Util 1 String.english_conjonction: two.
[OK] Util 2 String.english_conjonction: three.
[OK] Util 3 String.english_conjonction: more.
[OK] Parts 0 parse: "".
[OK] Parts 1 parse: "foo".
[OK] Parts 2 parse: " (* $MDX part-begin=bar *) ".
[OK] Parts 3 parse: "(* $MDX part-begin=bar ".
[OK] Parts 4 parse: " (* $MDX part-end *) ".
[OK] Parts 5 parse: " [@@@part \"foobar\"] ".
[OK] Parts 6 parse: "[@@@foo \"bar\"]".
[OK] Parts 7 parse: "(* $MDX foo *)".
[OK] Parts 8 parse: "(* $MDX part-end=foo *)".
Full test results in `~\src\_build\default\test\lib\_build\_tests\QTHRM9YA'.
Test Successful in 0.159s. 56 tests run.
File "test/bin/mdx-test/expect/code/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/code/test-case.md _build/default/test/bin/mdx-test/expect/code.actual
diff --git a/_build/default/test/bin/mdx-test/expect/code/test-case.md b/_build/default/test/bin/mdx-test/expect/code.actual
index 834e937..0949994 100755
--- a/_build/default/test/bin/mdx-test/expect/code/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/code.actual
@@ -1,33 +1,34 @@
-Normal OCaml code:
-
-```ocaml
-let x = 3
-
-let f x = x + 1
-
-let () = Printf.printf "n: %d\n%!" (f 42)
-```
-
-Yo!
-
-```ocaml
-# let x = 3;;
-val x : int = 3
-# type t = int;;
-type t = int
-```
-
-```ocaml
-class istack = object end
-```
-
-```ocaml
-# module type Foo = sig type t end;;
-module type Foo = sig type t end
-```
-
-
-```ocaml skip
-# Pipe.f ();;
-- : unit
+Normal OCaml code:
+
+```ocaml
+let x = 3
+
+let f x = x + 1
+
+let () = Printf.printf "n: %d\n%!" (f 42)
+```
+
+Yo!
+
+```ocaml
+# let x = 3;;
+val x : int = 3
+# type t = int;;
+type t = int
+```
+
+```ocaml
+class istack = object end
+```
+
+```ocaml
+# module type Foo = sig type t end;;
+module type Foo = sig type t end
+```
+
+
+```ocaml skip
+# Pipe.f ();;
+- : unit
+```
```
File "test/bin/misc-test-cases/mdx-pp/skip.ml.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/misc-test-cases/mdx-pp/skip.ml.expected _build/default/test/bin/misc-test-cases/mdx-pp/skip.ml
diff --git a/_build/default/test/bin/misc-test-cases/mdx-pp/skip.ml.expected b/_build/default/test/bin/misc-test-cases/mdx-pp/skip.ml
index e190bf8..e69de29 100755
--- a/_build/default/test/bin/misc-test-cases/mdx-pp/skip.ml.expected
+++ b/_build/default/test/bin/misc-test-cases/mdx-pp/skip.ml
@@ -1,6 +0,0 @@
-#4 "skip.md"
-let () = assert true
-;;
-#13 "skip.md"
-let () = assert true
-;;
File "test/bin/mdx-test/misc/environment-variable-unset/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/misc/environment-variable-unset/test-case.md _build/default/test/bin/mdx-test/misc/environment-variable-unset/test-case.output
diff --git a/_build/default/test/bin/mdx-test/misc/environment-variable-unset/test-case.md b/_build/default/test/bin/mdx-test/misc/environment-variable-unset/test-case.output
index d14ceae..ecc4e6e 100755
--- a/_build/default/test/bin/mdx-test/misc/environment-variable-unset/test-case.md
+++ b/_build/default/test/bin/mdx-test/misc/environment-variable-unset/test-case.output
@@ -1,11 +1,12 @@
-Environment variables can be unset in an shell and bash blocks.
-
-```sh
- $ echo $VAR
- val
-```
-
-```sh unset-VAR
- $ echo $VAR
-
+Environment variables can be unset in an shell and bash blocks.
+
+```sh
+ $ echo $VAR
+ val
+```
+
+```sh unset-VAR
+ $ echo $VAR
+
+```
```
File "test/bin/mdx-test/expect/bash-fence/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/bash-fence/test-case.md.expected _build/default/test/bin/mdx-test/expect/bash-fence.actual
diff --git a/_build/default/test/bin/mdx-test/expect/bash-fence/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/bash-fence.actual
index 0374f9a..63d828f 100755
--- a/_build/default/test/bin/mdx-test/expect/bash-fence/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/bash-fence.actual
@@ -1,21 +1,20 @@
-The choice of `bash` vs. `sh` code fences should be preserved:
-
-```bash
-$ echo 'bash block runs'
-bash block runs
-```
-
-```sh
-$ echo 'sh block runs'
-sh block runs
-```
-
-Even when the blocks are skipped:
-
-<!-- $MDX skip -->
-```bash
-```
-
-<!-- $MDX skip -->
-```sh
+The choice of `bash` vs. `sh` code fences should be preserved:
+
+```bash
+$ echo 'bash block runs'
+```
+
+```sh
+$ echo 'sh block runs'
+```
+
+Even when the blocks are skipped:
+
+<!-- $MDX skip -->
+```bash
+```
+
+<!-- $MDX skip -->
+```sh
+```
```
File "test/bin/mdx-test/expect/empty-lines/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/empty-lines/test-case.md.expected _build/default/test/bin/mdx-test/expect/empty-lines.actual
diff --git a/_build/default/test/bin/mdx-test/expect/empty-lines/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/empty-lines.actual
index 620992b..9c3ca75 100755
--- a/_build/default/test/bin/mdx-test/expect/empty-lines/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/empty-lines.actual
@@ -1,20 +1,18 @@
-This shell block contains an empty line within a padded block:
-
-```sh
- $ echo ''
-
-```
-
-```sh
- $ echo "Hello..." && echo "" && echo "world!"
- Hello...
-
- world!
-```
-
-This toplevel block contains an empty line within a padded block:
-
-```ocaml
- # print_newline;;
- - : unit -> unit = <fun>
+This shell block contains an empty line within a padded block:
+
+```sh
+ $ echo ''
+
+```
+
+```sh
+ $ echo "Hello..." && echo "" && echo "world!"
+```
+
+This toplevel block contains an empty line within a padded block:
+
+```ocaml
+ # print_newline;;
+
+```
```
File "test/bin/mdx-test/expect/ellipsis/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/ellipsis/test-case.md _build/default/test/bin/mdx-test/expect/ellipsis.actual
diff --git a/_build/default/test/bin/mdx-test/expect/ellipsis/test-case.md b/_build/default/test/bin/mdx-test/expect/ellipsis.actual
index cf77e93..42351d6 100755
--- a/_build/default/test/bin/mdx-test/expect/ellipsis/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/ellipsis.actual
@@ -1,33 +1,34 @@
-Long lines can be replaced by ellipsis:
-
-
-```sh
-$ for i in `seq 1 10`; do echo $i; done
-1
-2
-...
-10
-```
-
-```ocaml
-# for i = 1 to 10 do Printf.printf "%d\n%!" i; done;;
-1
-2
-...
-10
-- : unit = ()
-```
-
-```sh
-$ printf "foo\"\n\nbar"
-foo"
-
-...
-```
-
-Lines ending with ellipsis
-
-```sh
-$ echo Hello world
-Hello...
+Long lines can be replaced by ellipsis:
+
+
+```sh
+$ for i in `seq 1 10`; do echo $i; done
+1
+2
+...
+10
+```
+
+```ocaml
+# for i = 1 to 10 do Printf.printf "%d\n%!" i; done;;
+1
+2
+...
+10
+- : unit = ()
+```
+
+```sh
+$ printf "foo\"\n\nbar"
+foo"
+
+...
+```
+
+Lines ending with ellipsis
+
+```sh
+$ echo Hello world
+Hello...
+```
```
File "test/bin/mdx-test/expect/compenv-exit/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/compenv-exit/test-case.md.expected _build/default/test/bin/mdx-test/expect/compenv-exit.actual
diff --git a/_build/default/test/bin/mdx-test/expect/compenv-exit/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/compenv-exit.actual
index 0b1bb8e..ca4295f 100755
--- a/_build/default/test/bin/mdx-test/expect/compenv-exit/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/compenv-exit.actual
@@ -1,7 +1,6 @@
-Exits from the toplevel are reported correctly:
-
-```ocaml
-# #use "idontexist.ml";;
-Cannot find file idontexist.ml.
-[125]
+Exits from the toplevel are reported correctly:
+
+```ocaml
+# #use "idontexist.ml";;
+```
```
File "test/bin/mdx-test/expect/env-and-prelude/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/env-and-prelude/test-case.md _build/default/test/bin/mdx-test/expect/env-and-prelude.actual
diff --git a/_build/default/test/bin/mdx-test/expect/env-and-prelude/test-case.md b/_build/default/test/bin/mdx-test/expect/env-and-prelude.actual
index d1149a4..0c68d31 100755
--- a/_build/default/test/bin/mdx-test/expect/env-and-prelude/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/env-and-prelude.actual
@@ -55,3 +55,4 @@ Error: Unbound value a
...
Error: Unbound value b
```
+```
File "test/bin/mdx-test/expect/empty/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/empty/test-case.md _build/default/test/bin/mdx-test/expect/empty.actual
diff --git a/_build/default/test/bin/mdx-test/expect/empty/test-case.md b/_build/default/test/bin/mdx-test/expect/empty.actual
index 5d4c004..4305b07 100755
--- a/_build/default/test/bin/mdx-test/expect/empty/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/empty.actual
@@ -1,26 +1,27 @@
-Testing empty blocks
-
-```sh
-```
-
-```foo
-```
-
-<!-- $MDX env=x -->
-```foo
-```
-
-<!-- $MDX skip -->
-```
-```
-
-Empty lines are preserved:
-
-```foo
-
-```
-
-<!-- $MDX skip -->
-```
-
+Testing empty blocks
+
+```sh
+```
+
+```foo
+```
+
+<!-- $MDX env=x -->
+```foo
+```
+
+<!-- $MDX skip -->
+```
+```
+
+Empty lines are preserved:
+
+```foo
+
+```
+
+<!-- $MDX skip -->
+```
+
+```
```
File "test/bin/mdx-test/expect/ellipsis-updates/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/ellipsis-updates/test-case.md.expected _build/default/test/bin/mdx-test/expect/ellipsis-updates.actual
diff --git a/_build/default/test/bin/mdx-test/expect/ellipsis-updates/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/ellipsis-updates.actual
index c470ed3..53f9771 100755
--- a/_build/default/test/bin/mdx-test/expect/ellipsis-updates/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/ellipsis-updates.actual
@@ -1,30 +1,23 @@
-Ellipsis lines are preserved if possible even when the output changes
-
-```sh
-$ for i in `seq 1 21`; do echo $i; done
-1
-2
-...
-10
-...
-19
-20
-21
-```
-
-```sh
-$ for i in `seq 1 19`; do echo $i; done
-1
-2
-...
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
+Ellipsis lines are preserved if possible even when the output changes
+
+```sh
+$ for i in `seq 1 21`; do echo $i; done
+1
+2
+...
+10
+...
+19
+20
+```
+
+```sh
+$ for i in `seq 1 19`; do echo $i; done
+1
+2
+...
+10
+...
+20
+```
```
File "test/bin/mdx-test/expect/envs/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/envs/test-case.md _build/default/test/bin/mdx-test/expect/envs.actual
diff --git a/_build/default/test/bin/mdx-test/expect/envs/test-case.md b/_build/default/test/bin/mdx-test/expect/envs.actual
index 3f1d26b..03ca141 100755
--- a/_build/default/test/bin/mdx-test/expect/envs/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/envs.actual
@@ -133,3 +133,4 @@ Error: Unbound type constructor t4
Line 1, characters 11-12:
Error: Unbound value d
```
+```
File "test/bin/mdx-test/expect/include-block/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/include-block/test-case.md.expected _build/default/test/bin/mdx-test/expect/include-block.actual
diff --git a/_build/default/test/bin/mdx-test/expect/include-block/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/include-block.actual
index ed1f67a..971a3bc 100755
--- a/_build/default/test/bin/mdx-test/expect/include-block/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/include-block.actual
@@ -1,18 +1,7 @@
-We include files with MDX comments:
-
-<!-- $MDX file=code.mli -->
-```ocaml
-type t
-
-val empty : t
-```
-
-<!-- $MDX file=dune -->
-```scheme
-
-```
-
-<!-- $MDX file=../.ocamlformat -->
-```
-disable=true
-```
+We include files with MDX comments:
+
+<!-- $MDX file=code.mli -->
+
+<!-- $MDX file=dune -->
+
+<!-- $MDX file=../.ocamlformat -->
File "test/bin/mdx-test/expect/line-delimiters/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/line-delimiters/test-case.md _build/default/test/bin/mdx-test/expect/line-delimiters.actual
diff --git a/_build/default/test/bin/mdx-test/expect/line-delimiters/test-case.md b/_build/default/test/bin/mdx-test/expect/line-delimiters.actual
index cef44ad..ec55a21 100755
--- a/_build/default/test/bin/mdx-test/expect/line-delimiters/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/line-delimiters.actual
@@ -1,6 +1,7 @@
-<!-- $MDX file=include.ml,part=something -->
-```ocaml
-type t =
- | Foo
- | Bar
+<!-- $MDX file=include.ml,part=something -->
+```ocaml
+type t =
+ | Foo
+ | Bar
+```
```
File "test/bin/mdx-test/expect/errors/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/errors/test-case.md _build/default/test/bin/mdx-test/expect/errors.actual
diff --git a/_build/default/test/bin/mdx-test/expect/errors/test-case.md b/_build/default/test/bin/mdx-test/expect/errors.actual
index 7935462..7d71ca4 100755
--- a/_build/default/test/bin/mdx-test/expect/errors/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/errors.actual
@@ -1,81 +1,82 @@
-Errors should be well localized:
-
+Errors should be well localized:
+
```ocaml version<4.08
-# class ['a] stack init = object
- val mutable v = init
-
- method pop =
- match v with
- | hd :: tl ->
- v <- tl;
- Some hd
- | [] -> None
-
- method push hd =
- v <- hd :: v
- end;;
-Characters 0-215:
-Error: Some type variables are unbound in this type:
- class ['a] stack :
- 'b list ->
- object
- val mutable v : 'b list
- method pop : 'b option
- method push : 'b -> unit
- end
- The method pop has type 'b option where 'b is unbound
-```
-
-Hi!
-
-
-```ocaml version=4.02
-# let x =
- 1 + "42";;
-Characters 14-18:
-Error: This expression has type bytes but an expression was expected of type
- int
-```
-
-```ocaml version=4.06
-# let x =
- 1 + "42";;
-Characters 14-18:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version=4.07
-# let x =
- 1 + "42";;
-Characters 14-18:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml non-deterministic=output
-# raise Not_found;;
-Exception: Not_found.
-```
-
-```ocaml
-# print_endline "first"; failwith "second";;
-first
-Exception: Failure "second".
-```
-
-```ocaml version>=4.08,version<5.3
-# let x =
- 1 + "42";;
-Line 2, characters 7-11:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version>=5.3
-# let x =
- 1 + "42";;
-Line 2, characters 7-11:
-Error: This constant has type string but an expression was expected of type
- int
+# class ['a] stack init = object
+ val mutable v = init
+
+ method pop =
+ match v with
+ | hd :: tl ->
+ v <- tl;
+ Some hd
+ | [] -> None
+
+ method push hd =
+ v <- hd :: v
+ end;;
+Characters 0-215:
+Error: Some type variables are unbound in this type:
+ class ['a] stack :
+ 'b list ->
+ object
+ val mutable v : 'b list
+ method pop : 'b option
+ method push : 'b -> unit
+ end
+ The method pop has type 'b option where 'b is unbound
+```
+
+Hi!
+
+
+```ocaml version=4.02
+# let x =
+ 1 + "42";;
+Characters 14-18:
+Error: This expression has type bytes but an expression was expected of type
+ int
+```
+
+```ocaml version=4.06
+# let x =
+ 1 + "42";;
+Characters 14-18:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version=4.07
+# let x =
+ 1 + "42";;
+Characters 14-18:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml non-deterministic=output
+# raise Not_found;;
+Exception: Not_found.
+```
+
+```ocaml
+# print_endline "first"; failwith "second";;
+first
+Exception: Failure "second".
+```
+
+```ocaml version>=4.08,version<5.3
+# let x =
+ 1 + "42";;
+Line 2, characters 7-11:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version>=5.3
+# let x =
+ 1 + "42";;
+Line 2, characters 7-11:
+Error: This constant has type string but an expression was expected of type
+ int
+```
```
File "test/bin/mdx-test/expect/exit/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/exit/test-case.md _build/default/test/bin/mdx-test/expect/exit.actual
diff --git a/_build/default/test/bin/mdx-test/expect/exit/test-case.md b/_build/default/test/bin/mdx-test/expect/exit.actual
index 736b283..98fce39 100755
--- a/_build/default/test/bin/mdx-test/expect/exit/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/exit.actual
@@ -1,13 +1,14 @@
-Exit codes are updated properly:
-
-
-```sh
-$ exit 0
-```
-
-```sh
-$ exit 1
-[1]
-$ exit 10
-[10]
+Exit codes are updated properly:
+
+
+```sh
+$ exit 0
+```
+
+```sh
+$ exit 1
+[1]
+$ exit 10
+[10]
+```
```
File "test/bin/mdx-test/expect/labels-syntax/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/labels-syntax/test-case.md _build/default/test/bin/mdx-test/expect/labels-syntax.actual
diff --git a/_build/default/test/bin/mdx-test/expect/labels-syntax/test-case.md b/_build/default/test/bin/mdx-test/expect/labels-syntax.actual
index d3c1e71..6222461 100755
--- a/_build/default/test/bin/mdx-test/expect/labels-syntax/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/labels-syntax.actual
@@ -1,30 +1,31 @@
-We are testing the new label syntax on some existing tests.
-
-# Set environment variables
-
-Environment variables can be loaded in an ocaml block environment.
-
-<!-- $MDX set-FOO=bar,set-BAR=foo -->
-```ocaml
- # print_endline (Sys.getenv "FOO");;
- bar
- - : unit = ()
- # print_endline (Sys.getenv "BAR");;
- foo
- - : unit = ()
-```
-
-### Non-deterministic Outputs
-
-<!-- $MDX non-deterministic=output -->
-```sh
-$ echo $RANDOM
-4150
-```
-
-### Non-deterministic Commands
-
-<!-- $MDX non-deterministic=command -->
-```sh
-$ touch toto
+We are testing the new label syntax on some existing tests.
+
+# Set environment variables
+
+Environment variables can be loaded in an ocaml block environment.
+
+<!-- $MDX set-FOO=bar,set-BAR=foo -->
+```ocaml
+ # print_endline (Sys.getenv "FOO");;
+ bar
+ - : unit = ()
+ # print_endline (Sys.getenv "BAR");;
+ foo
+ - : unit = ()
+```
+
+### Non-deterministic Outputs
+
+<!-- $MDX non-deterministic=output -->
+```sh
+$ echo $RANDOM
+4150
+```
+
+### Non-deterministic Commands
+
+<!-- $MDX non-deterministic=command -->
+```sh
+$ touch toto
+```
```
File "test/bin/mdx-test/expect/lines/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/lines/test-case.md _build/default/test/bin/mdx-test/expect/lines.actual
diff --git a/_build/default/test/bin/mdx-test/expect/lines/test-case.md b/_build/default/test/bin/mdx-test/expect/lines.actual
index d999acc..7130263 100755
--- a/_build/default/test/bin/mdx-test/expect/lines/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/lines.actual
@@ -1,89 +1,90 @@
-Testing lines directives
-
-```ocaml
-let f x =
- x+x
- +x
-```
-
-And
-
-```ocaml version=4.02
-# let f x = x + 1;;
-val f : int -> int = <fun>
-# let f y =
- y^"foo";;
-val f : bytes -> bytes = <fun>
-```
-
-```ocaml version>=4.06
-# let f x = x + 1;;
-val f : int -> int = <fun>
-# let f y =
- y^"foo";;
-val f : string -> string = <fun>
-```
-
-And
-
-```ocaml version=4.02
-# let f x = function
- | 0 -> 1
- | n ->
- n + "foo";;
-Characters 45-50:
-Error: This expression has type bytes but an expression was expected of type
- int
-```
-
-```ocaml version=4.06
-# let f x = function
- | 0 -> 1
- | n ->
- n + "foo";;
-Characters 45-50:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version=4.07
-# let f x = function
- | 0 -> 1
- | n ->
- n + "foo";;
-Characters 45-50:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version>=4.08,version<5.3
-# let f x = function
- | 0 -> 1
- | n ->
- n + "foo";;
-Line 4, characters 7-12:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version>=5.3
-# let f x = function
- | 0 -> 1
- | n ->
- n + "foo";;
-Line 4, characters 7-12:
-Error: This constant has type string but an expression was expected of type
- int
-```
-
-Line directives work for `sh` blocks as well:
-
-```sh version=4.08.1
-$ ocamlc -version
-4.08.1
-```
-
-```sh version=4.07.1
-$ ocamlc -version
-4.07.1
+Testing lines directives
+
+```ocaml
+let f x =
+ x+x
+ +x
+```
+
+And
+
+```ocaml version=4.02
+# let f x = x + 1;;
+val f : int -> int = <fun>
+# let f y =
+ y^"foo";;
+val f : bytes -> bytes = <fun>
+```
+
+```ocaml version>=4.06
+# let f x = x + 1;;
+val f : int -> int = <fun>
+# let f y =
+ y^"foo";;
+val f : string -> string = <fun>
+```
+
+And
+
+```ocaml version=4.02
+# let f x = function
+ | 0 -> 1
+ | n ->
+ n + "foo";;
+Characters 45-50:
+Error: This expression has type bytes but an expression was expected of type
+ int
+```
+
+```ocaml version=4.06
+# let f x = function
+ | 0 -> 1
+ | n ->
+ n + "foo";;
+Characters 45-50:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version=4.07
+# let f x = function
+ | 0 -> 1
+ | n ->
+ n + "foo";;
+Characters 45-50:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version>=4.08,version<5.3
+# let f x = function
+ | 0 -> 1
+ | n ->
+ n + "foo";;
+Line 4, characters 7-12:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version>=5.3
+# let f x = function
+ | 0 -> 1
+ | n ->
+ n + "foo";;
+Line 4, characters 7-12:
+Error: This constant has type string but an expression was expected of type
+ int
+```
+
+Line directives work for `sh` blocks as well:
+
+```sh version=4.08.1
+$ ocamlc -version
+4.08.1
+```
+
+```sh version=4.07.1
+$ ocamlc -version
+4.07.1
+```
```
File "test/bin/mdx-test/expect/heredoc/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/heredoc/test-case.md _build/default/test/bin/mdx-test/expect/heredoc.actual
diff --git a/_build/default/test/bin/mdx-test/expect/heredoc/test-case.md b/_build/default/test/bin/mdx-test/expect/heredoc.actual
index 72e34f9..b982c01 100755
--- a/_build/default/test/bin/mdx-test/expect/heredoc/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/heredoc.actual
@@ -1,26 +1,27 @@
-Support for heredoc syntax:
-
-```sh
-$ cat <<EOF \
-> hello\
-> world\
-> EOF
-hello
-world
-$ echo foo
-foo
-```
-
-And
-
-```sh
-$ cat <<EOF > foo \
-> hello\
-> world\
-> EOF
-$ cat foo
-hello
-world
-$ echo foo
-foo
+Support for heredoc syntax:
+
+```sh
+$ cat <<EOF \
+> hello\
+> world\
+> EOF
+hello
+world
+$ echo foo
+foo
+```
+
+And
+
+```sh
+$ cat <<EOF > foo \
+> hello\
+> world\
+> EOF
+$ cat foo
+hello
+world
+$ echo foo
+foo
+```
```
File "test/bin/mdx-test/expect/mlt/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/mlt/test-case.md _build/default/test/bin/mdx-test/expect/mlt.actual
diff --git a/_build/default/test/bin/mdx-test/expect/mlt/test-case.md b/_build/default/test/bin/mdx-test/expect/mlt.actual
index 1721a9f..c44a063 100755
--- a/_build/default/test/bin/mdx-test/expect/mlt/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/mlt.actual
@@ -1,51 +1,52 @@
-Mdx can also understand ocaml code blocks:
-
+Mdx can also understand ocaml code blocks:
+
```ocaml version=4.02
-# #require "fmt";;
-# let x = 3;;
-val x : int = 3
-# x + "foo";;
-Characters 4-9:
-Error: This expression has type bytes but an expression was expected of type
- int
-```
-
-```ocaml version=4.06
-# #require "fmt";;
-# let x = 3;;
-val x : int = 3
-# x + "foo";;
-Characters 4-9:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version=4.07
-# #require "fmt";;
-# let x = 3;;
-val x : int = 3
-# x + "foo";;
-Characters 4-9:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version>=4.08,version<5.3
-# #require "fmt";;
-# let x = 3;;
-val x : int = 3
-# x + "foo";;
-Line 1, characters 5-10:
-Error: This expression has type string but an expression was expected of type
- int
-```
-
-```ocaml version>=5.3
-# #require "fmt";;
-# let x = 3;;
-val x : int = 3
-# x + "foo";;
-Line 1, characters 5-10:
-Error: This constant has type string but an expression was expected of type
- int
+# #require "fmt";;
+# let x = 3;;
+val x : int = 3
+# x + "foo";;
+Characters 4-9:
+Error: This expression has type bytes but an expression was expected of type
+ int
+```
+
+```ocaml version=4.06
+# #require "fmt";;
+# let x = 3;;
+val x : int = 3
+# x + "foo";;
+Characters 4-9:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version=4.07
+# #require "fmt";;
+# let x = 3;;
+val x : int = 3
+# x + "foo";;
+Characters 4-9:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version>=4.08,version<5.3
+# #require "fmt";;
+# let x = 3;;
+val x : int = 3
+# x + "foo";;
+Line 1, characters 5-10:
+Error: This expression has type string but an expression was expected of type
+ int
+```
+
+```ocaml version>=5.3
+# #require "fmt";;
+# let x = 3;;
+val x : int = 3
+# x + "foo";;
+Line 1, characters 5-10:
+Error: This constant has type string but an expression was expected of type
+ int
+```
```
File "test/bin/mdx-test/expect/lwt/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/lwt/test-case.md _build/default/test/bin/mdx-test/expect/lwt.actual
diff --git a/_build/default/test/bin/mdx-test/expect/lwt/test-case.md b/_build/default/test/bin/mdx-test/expect/lwt.actual
index dc541a0..5d77b35 100755
--- a/_build/default/test/bin/mdx-test/expect/lwt/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/lwt.actual
@@ -1,16 +1,17 @@
-#require directives work as expected:
-
-```ocaml
-# #require "lwt";;
-# let x = Lwt.return 3;;
-val x : int Lwt.t = <abstr>
-```
-
-Top-level `Lwt` values are automatically evaluated with `Lwt_main.run`:
-
-```ocaml
-# Lwt.return 4;;
-- : int = 4
-# Lwt_list.map_p Lwt.return [1;2;3];;
-- : int list = [1; 2; 3]
+#require directives work as expected:
+
+```ocaml
+# #require "lwt";;
+# let x = Lwt.return 3;;
+val x : int Lwt.t = <abstr>
+```
+
+Top-level `Lwt` values are automatically evaluated with `Lwt_main.run`:
+
+```ocaml
+# Lwt.return 4;;
+- : int = 4
+# Lwt_list.map_p Lwt.return [1;2;3];;
+- : int list = [1; 2; 3]
+```
```
File "test/bin/mdx-test/expect/empty-line/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/empty-line/test-case.md _build/default/test/bin/mdx-test/expect/empty-line.actual
diff --git a/_build/default/test/bin/mdx-test/expect/empty-line/test-case.md b/_build/default/test/bin/mdx-test/expect/empty-line.actual
index 15a7cea..8c0e912 100755
--- a/_build/default/test/bin/mdx-test/expect/empty-line/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/empty-line.actual
@@ -1,8 +1,9 @@
-Testing empty line output
-
-```ocaml
-# print_newline ();;
-- : unit = ()
-# print_endline "";;
-- : unit = ()
+Testing empty line output
+
+```ocaml
+# print_newline ();;
+- : unit = ()
+# print_endline "";;
+- : unit = ()
+```
```
File "test/bin/mdx-test/expect/padding/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/padding/test-case.md _build/default/test/bin/mdx-test/expect/padding.actual
diff --git a/_build/default/test/bin/mdx-test/expect/padding/test-case.md b/_build/default/test/bin/mdx-test/expect/padding.actual
index a0d5f93..2aaf1db 100755
--- a/_build/default/test/bin/mdx-test/expect/padding/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/padding.actual
@@ -1,20 +1,21 @@
-Arbitrary padding is allowed, as long as it is consistent inside a code block.
-
-```sh
- $ echo foo
- foo
-```
-
-```ocaml
- # let x = 3;;
- val x : int = 3
-```
-
-```sh version<4.12
-$ ocaml -warn-help | grep -E '\b9 Missing\b'
- 9 Missing fields in a record pattern.
-```
-```sh version>=4.12
-$ ocaml -warn-help | grep -E '\b9 \[missing-record-field-pattern\] Missing\b'
- 9 [missing-record-field-pattern] Missing fields in a record pattern.
+Arbitrary padding is allowed, as long as it is consistent inside a code block.
+
+```sh
+ $ echo foo
+ foo
+```
+
+```ocaml
+ # let x = 3;;
+ val x : int = 3
+```
+
+```sh version<4.12
+$ ocaml -warn-help | grep -E '\b9 Missing\b'
+ 9 Missing fields in a record pattern.
+```
+```sh version>=4.12
+$ ocaml -warn-help | grep -E '\b9 \[missing-record-field-pattern\] Missing\b'
+ 9 [missing-record-field-pattern] Missing fields in a record pattern.
+```
```
File "test/bin/mdx-test/expect/ocaml-errors-ellipsis/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/ocaml-errors-ellipsis/test-case.md _build/default/test/bin/mdx-test/expect/ocaml-errors-ellipsis.actual
diff --git a/_build/default/test/bin/mdx-test/expect/ocaml-errors-ellipsis/test-case.md b/_build/default/test/bin/mdx-test/expect/ocaml-errors-ellipsis.actual
index dff005f..c97d5d4 100755
--- a/_build/default/test/bin/mdx-test/expect/ocaml-errors-ellipsis/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/ocaml-errors-ellipsis.actual
@@ -1,23 +1,24 @@
-It is possible to use ellipsis (`...`) in the error blocks attached to OCaml blocks, here it is useful as the error message depends on the OCaml version:
-
+It is possible to use ellipsis (`...`) in the error blocks attached to OCaml blocks, here it is useful as the error message depends on the OCaml version:
+
```ocaml version<5.2
-module Counter: Irmin.Contents.S with type t = int64 = struct
- type t = int64
- let t = Irmin.Type.int64
-```
-```mdx-error
-...
-Error: Syntax error: 'end' expected
-...
-```
-
-```ocaml
-module Counter: Irmin.Contents.S with type t = int64 = struct
- type t = int64
- let t = Irmin.Type.int64
-end
-```
-```mdx-error
-...
-Error: Unbound module Irmin
+module Counter: Irmin.Contents.S with type t = int64 = struct
+ type t = int64
+ let t = Irmin.Type.int64
+```
+```mdx-error
+...
+Error: Syntax error: 'end' expected
+...
+```
+
+```ocaml
+module Counter: Irmin.Contents.S with type t = int64 = struct
+ type t = int64
+ let t = Irmin.Type.int64
+end
+```
+```mdx-error
+...
+Error: Unbound module Irmin
+```
```
File "test/bin/mdx-test/expect/multilines/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/multilines/test-case.md _build/default/test/bin/mdx-test/expect/multilines.actual
diff --git a/_build/default/test/bin/mdx-test/expect/multilines/test-case.md b/_build/default/test/bin/mdx-test/expect/multilines.actual
index ac9185c..3a305db 100755
--- a/_build/default/test/bin/mdx-test/expect/multilines/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/multilines.actual
@@ -1,37 +1,38 @@
-Test multi-lines shell commands:
-
-```sh
-$ for i in `seq 1 10`; do \
-> echo $i; \
-> done
-1
-...
-10
-```
-
-This works trivially for normal OCaml fragments:
-
-```ocaml
-let rec fact = function
-| 1 -> 1
-| n -> n * fact (n-1)
-```
-
-And it should work fine for toplevel too:
-
-```ocaml
-# let rec fact = function
- | 1 -> 1
- | n -> n * fact (n-1)
- ;;
-val fact : int -> int = <fun>
-```
-
-```ocaml
-# print_string "foo \
- \" \
- toto\
- \ bar\"";;
-foo " toto bar"
-- : unit = ()
+Test multi-lines shell commands:
+
+```sh
+$ for i in `seq 1 10`; do \
+> echo $i; \
+> done
+1
+...
+10
+```
+
+This works trivially for normal OCaml fragments:
+
+```ocaml
+let rec fact = function
+| 1 -> 1
+| n -> n * fact (n-1)
+```
+
+And it should work fine for toplevel too:
+
+```ocaml
+# let rec fact = function
+ | 1 -> 1
+ | n -> n * fact (n-1)
+ ;;
+val fact : int -> int = <fun>
+```
+
+```ocaml
+# print_string "foo \
+ \" \
+ toto\
+ \ bar\"";;
+foo " toto bar"
+- : unit = ()
+```
```
File "test/bin/mdx-test/expect/section/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/section/test-case.md.expected _build/default/test/bin/mdx-test/expect/section.actual
diff --git a/_build/default/test/bin/mdx-test/expect/section/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/section.actual
index 579f979..10c272b 100755
--- a/_build/default/test/bin/mdx-test/expect/section/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/section.actual
@@ -1,55 +1,56 @@
-## Title
-
-Only blocks that pass the filter 'Testing' should be printed
-
-### Hello
-
-```ocaml
-let x = 42 in
-Printf.printf "%d\n%!" x
+## Title
+
+Only blocks that pass the filter 'Testing' should be printed
+
+### Hello
+
+```ocaml
+let x = 42 in
+Printf.printf "%d\n%!" x
+```
+
+```
+raw contents
+```
+
+### Toto
+
+```ocaml
+let x = 2
+```
+
+### Testing cram
+
+```sh
+ $ for i in `seq 1 10`; do echo $i; done
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+```
+
+### Not testing cram
+
+```sh
+$ ls
+foo bar
+```
+
+```ocaml
+let () = print_endline (string_of_int x)
+```
+
+## Toplevel
+
+```ocaml
+ # print_endline "42";;
+ 42
+```
+
```
-
-```
-raw contents
-```
-
-### Toto
-
-```ocaml
-let x = 2
-```
-
-### Testing cram
-
-```sh
- $ for i in `seq 1 10`; do echo $i; done
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-```
-
-### Not testing cram
-
-```sh
-$ ls
-foo bar
-```
-
-```ocaml
-let () = print_endline (string_of_int x)
-```
-
-## Toplevel
-
-```ocaml
- # print_endline "42";;
- 42
-```
-
File "test/bin/mdx-test/expect/prelude/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/prelude/test-case.md _build/default/test/bin/mdx-test/expect/prelude.actual
diff --git a/_build/default/test/bin/mdx-test/expect/prelude/test-case.md b/_build/default/test/bin/mdx-test/expect/prelude.actual
index 8662040..83ca631 100755
--- a/_build/default/test/bin/mdx-test/expect/prelude/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/prelude.actual
@@ -25,3 +25,4 @@ Error: Unbound value x
Line 1, characters 15-16:
Error: Unbound value x
```
+```
File "test/bin/mdx-test/expect/ocaml-errors/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/ocaml-errors/test-case.md.expected _build/default/test/bin/mdx-test/expect/ocaml-errors.actual
diff --git a/_build/default/test/bin/mdx-test/expect/ocaml-errors/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/ocaml-errors.actual
index 6c93d2f..2f81348 100755
--- a/_build/default/test/bin/mdx-test/expect/ocaml-errors/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/ocaml-errors.actual
@@ -1,44 +1,51 @@
-The errors raised when evaluating OCaml blocks are displayed in a `mdx-error` block, that is immediately following the `ocaml` block it is attached to:
-
-
+The errors raised when evaluating OCaml blocks are displayed in a `mdx-error` block, that is immediately following the `ocaml` block it is attached to:
+
+
```ocaml version<4.08
-module Counter: Irmin.Contents.S with type t = int64 = struct
- type t = int64
- let t = Irmin.Type.int64
-```
-```mdx-error
-Characters 112-112:
-Error: Syntax error: 'end' expected
-Characters 55-61:
-Error: This 'struct' might be unmatched
-```
-
-
-```ocaml version>=5.2
-module Counter: Irmin.Contents.S with type t = int64 = struct
- type t = int64
- let t = Irmin.Type.int64
-```
-```mdx-error
-Line 4, characters 3-3:
-Error: Syntax error: end expected
-Line 1, characters 56-62:
- This struct might be unmatched
-```
-
-
-If no error is raised, no error block must be attached:
-
-```ocaml
-module Counter = struct
- type t = int64
-end
-```
-
-Existing error blocks attached to a valid ocaml block are removed:
-
-```ocaml
-module Counter = struct
- type t = int64
-end
+module Counter: Irmin.Contents.S with type t = int64 = struct
+ type t = int64
+ let t = Irmin.Type.int64
+```
+```mdx-error
+Characters 112-112:
+Error: Syntax error: 'end' expected
+Characters 55-61:
+Error: This 'struct' might be unmatched
+```
+
+
+```ocaml version>=5.2
+module Counter: Irmin.Contents.S with type t = int64 = struct
+ type t = int64
+ let t = Irmin.Type.int64
+```
+```mdx-error
+Line 4, characters 3-3:
+Error: Syntax error: end expected
+Line 1, characters 56-62:
+ This struct might be unmatched
+```
+
+
+If no error is raised, no error block must be attached:
+
+```ocaml
+module Counter = struct
+ type t = int64
+end
+```
+
+Existing error blocks attached to a valid ocaml block are removed:
+
+```ocaml
+module Counter = struct
+ type t = int64
+end
+```
+```mdx-error
+Line 4, characters 3-3:
+Error: Syntax error: end expected
+Line 1, characters 56-62:
+ This struct might be unmatched
+```
```
File "test/bin/mdx-test/expect/ocaml-408-syntax/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/ocaml-408-syntax/test-case.md _build/default/test/bin/mdx-test/expect/ocaml-408-syntax.actual
diff --git a/_build/default/test/bin/mdx-test/expect/ocaml-408-syntax/test-case.md b/_build/default/test/bin/mdx-test/expect/ocaml-408-syntax.actual
index 0146385..8b3b9f3 100755
--- a/_build/default/test/bin/mdx-test/expect/ocaml-408-syntax/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/ocaml-408-syntax.actual
@@ -5,3 +5,8 @@ let testma f =
let* s = ma in
f s
```
+```
+```mdx-error
+Line 5, characters 4-5:
+Error: Syntax error
+```
File "test/bin/mdx-test/expect/os_type/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/os_type/test-case.md _build/default/test/bin/mdx-test/expect/os_type.actual
diff --git a/_build/default/test/bin/mdx-test/expect/os_type/test-case.md b/_build/default/test/bin/mdx-test/expect/os_type.actual
index bd1c1cd..4087437 100755
--- a/_build/default/test/bin/mdx-test/expect/os_type/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/os_type.actual
@@ -3,10 +3,7 @@ Mdx can skip blocks based on `os_type`:
```ocaml os_type<>Win32
# #require "unix"
# ignore (Unix.nice 0)
-- : unit = ()
-```
-
-```ocaml os_type=Win32
+Exception: Invalid_argument "Unix.nice not implemented".
# #require "unix"
# ignore (Unix.nice 0)
Exception: Invalid_argument "Unix.nice not implemented".
File "test/bin/mdx-test/expect/prelude-file/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/prelude-file/test-case.md _build/default/test/bin/mdx-test/expect/prelude-file.actual
diff --git a/_build/default/test/bin/mdx-test/expect/prelude-file/test-case.md b/_build/default/test/bin/mdx-test/expect/prelude-file.actual
index 147351a..1e11c71 100755
--- a/_build/default/test/bin/mdx-test/expect/prelude-file/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/prelude-file.actual
@@ -5,9 +5,6 @@ Prelude can also be in a file
```ocaml env=toto
# raise Not_found;;
Exception: Not_found.
-```
-
-```ocaml
# print_int x;;
2
- : unit = ()
File "test/bin/mdx-test/expect/unclosed-block/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/unclosed-block/test-case.md.expected _build/default/test/bin/mdx-test/expect/unclosed-block.actual
diff --git a/_build/default/test/bin/mdx-test/expect/unclosed-block/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/unclosed-block.actual
index a41057c..75dce46 100755
--- a/_build/default/test/bin/mdx-test/expect/unclosed-block/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/unclosed-block.actual
@@ -1,8 +1,8 @@
-Here is a good block:
-
-```ocaml
-```
-
-And here is one that is not closed, this should not cause an infinite loop in the lexer:
-```
+Here is a good block:
+
+```ocaml
+```
+
+And here is one that is not closed, this should not cause an infinite loop in the lexer:
+```
```
File "test/bin/mdx-test/expect/root-option/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/root-option/test-case.md.expected _build/default/test/bin/mdx-test/expect/root-option.actual
diff --git a/_build/default/test/bin/mdx-test/expect/root-option/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/root-option.actual
index 7c35c91..e21610b 100755
--- a/_build/default/test/bin/mdx-test/expect/root-option/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/root-option.actual
@@ -1,6 +1,7 @@
-It's possible to run cram tests in separate directories:
-
-```sh
-$ basename $(pwd)
-somedir
+It's possible to run cram tests in separate directories:
+
+```sh
+$ basename $(pwd)
+somedir
+```
```
File "test/bin/mdx-test/expect/toploop-getvalue/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/toploop-getvalue/test-case.md _build/default/test/bin/mdx-test/expect/toploop-getvalue.actual
diff --git a/_build/default/test/bin/mdx-test/expect/toploop-getvalue/test-case.md b/_build/default/test/bin/mdx-test/expect/toploop-getvalue.actual
index 4a5639f..c005438 100755
--- a/_build/default/test/bin/mdx-test/expect/toploop-getvalue/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/toploop-getvalue.actual
@@ -1,16 +1,17 @@
-Mdx used to fail with module aliases and includes. This is a regression test to
-ensure nothing breaks again in the future.
-
-```ocaml
-# module Test = String;;
-module Test = String
+Mdx used to fail with module aliases and includes. This is a regression test to
+ensure nothing breaks again in the future.
+
+```ocaml
+# module Test = String;;
+module Test = String
+```
+
+```ocaml
+# include struct module M = struct type t end end;;
+module M : sig type t end
+```
+
+The bug was caused by an attempt to load the newly created module without
+checking if it was supposed to be in the store (advertised by the
+`module_presence` type), or without using the correct name.
```
-
-```ocaml
-# include struct module M = struct type t end end;;
-module M : sig type t end
-```
-
-The bug was caused by an attempt to load the newly created module without
-checking if it was supposed to be in the store (advertised by the
-`module_presence` type), or without using the correct name.
File "test/bin/mdx-test/expect/trailing-whitespaces/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/trailing-whitespaces/test-case.md.expected _build/default/test/bin/mdx-test/expect/trailing-whitespaces.actual
diff --git a/_build/default/test/bin/mdx-test/expect/trailing-whitespaces/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/trailing-whitespaces.actual
index 604233e..b1a98ca 100755
--- a/_build/default/test/bin/mdx-test/expect/trailing-whitespaces/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/trailing-whitespaces.actual
@@ -1,21 +1,22 @@
-# Remove trailing whitespace from output lines
-
-```ocaml
-# let x = 13;;
-val x : int = 13
-```
-
-```sh
-$ echo "bob "
-bob
-```
-
-Also, it should be valid to terminate phrases that end with `;;` but have
-trailing whitespace:
-
-```ocaml
-# let terminated_with_space = 42;;
-val terminated_with_space : int = 42
-# let terminated_with_tab = 42;;
-val terminated_with_tab : int = 42
+# Remove trailing whitespace from output lines
+
+```ocaml
+# let x = 13;;
+val x : int = 13
+```
+
+```sh
+$ echo "bob "
+bob
+```
+
+Also, it should be valid to terminate phrases that end with `;;` but have
+trailing whitespace:
+
+```ocaml
+# let terminated_with_space = 42;;
+val terminated_with_space : int = 42
+# let terminated_with_tab = 42;;
+val terminated_with_tab : int = 42
+```
```
File "test/bin/mdx-test/expect/spaces/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/spaces/test-case.md _build/default/test/bin/mdx-test/expect/spaces.actual
diff --git a/_build/default/test/bin/mdx-test/expect/spaces/test-case.md b/_build/default/test/bin/mdx-test/expect/spaces.actual
index f285fec..49eef8d 100755
--- a/_build/default/test/bin/mdx-test/expect/spaces/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/spaces.actual
@@ -1,29 +1,30 @@
-Mdx test should preserve empty lines in code blocks
-
-```ocaml
-
-
-let x =
-
- 5
-
-```
-
-```ocaml
-
-# let x = 1
-
- in x;;
-- : int = 1
-
-
-# 3;;
-- : int = 3
-
-
-# Printf.printf "foo\n\nbar\n";;
-foo
-
-bar
-- : unit = ()
+Mdx test should preserve empty lines in code blocks
+
+```ocaml
+
+
+let x =
+
+ 5
+
+```
+
+```ocaml
+
+# let x = 1
+
+ in x;;
+- : int = 1
+
+
+# 3;;
+- : int = 3
+
+
+# Printf.printf "foo\n\nbar\n";;
+foo
+
+bar
+- : unit = ()
+```
```
File "test/bin/mdx-test/expect/tabs/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/tabs/test-case.md.expected _build/default/test/bin/mdx-test/expect/tabs.actual
diff --git a/_build/default/test/bin/mdx-test/expect/tabs/test-case.md.expected b/_build/default/test/bin/mdx-test/expect/tabs.actual
index e4d5223..925ea99 100755
--- a/_build/default/test/bin/mdx-test/expect/tabs/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/expect/tabs.actual
@@ -1,8 +1,9 @@
-Code indented using tabulations will be reindented using spaces:
-
-```ocaml
-# let foo =
- let bar = 14 in
- [ bar ];;
-val foo : int list = [14]
+Code indented using tabulations will be reindented using spaces:
+
+```ocaml
+# let foo =
+ let bar = 14 in
+ [ bar ];;
+val foo : int list = [14]
+```
```
File "test/bin/mdx-test/expect/warnings/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/warnings/test-case.md _build/default/test/bin/mdx-test/expect/warnings.actual
diff --git a/_build/default/test/bin/mdx-test/expect/warnings/test-case.md b/_build/default/test/bin/mdx-test/expect/warnings.actual
index a000e99..d490573 100755
--- a/_build/default/test/bin/mdx-test/expect/warnings/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/warnings.actual
@@ -1,68 +1,69 @@
-No warning is printed by default:
-
-```ocaml
-type p = { x : int ; y : int }
-
-let x { x } = x
-```
-
-Warning attributes must be set to print them:
-
-```ocaml version<4.12
-[@@@warning "+9"]
-let x { x } = x
-```
-```mdx-error
-...
-Warning 9: the following labels are not bound in this record pattern:
-y
-Either bind these labels explicitly or add '; _' to the pattern.
-```
-
-```ocaml version>=4.12,version<5.4
-[@@@warning "+9"]
-let x { x } = x
-```
-```mdx-error
-Line 2, characters 9-14:
-Warning 9 [missing-record-field-pattern]: the following labels are not bound in this record pattern:
-y
-Either bind these labels explicitly or add '; _' to the pattern.
-```
-
-```ocaml version>=5.4
-[@@@warning "+9"]
-let x { x } = x
-```
-```mdx-error
-Line 2, characters 9-14:
-Warning 9 [missing-record-field-pattern]: the following labels are not bound
- in this record pattern: y.
- Either bind these labels explicitly or add ; _ to the pattern.
-```
-
-Test against some false positives:
-
-```ocaml
-let x = [ "Warning" ]
-```
-
-```ocaml
-module Warning = struct
- type t = Warning
-end
-
-let warning = Warning.Warning
-```
-
-Intended false positive:
-
-```ocaml
-let x =
- if true then
- prerr_endline "Warning: Assert failed";
- [ "foo" ]
-```
-```mdx-error
-Warning: Assert failed
+No warning is printed by default:
+
+```ocaml
+type p = { x : int ; y : int }
+
+let x { x } = x
+```
+
+Warning attributes must be set to print them:
+
+```ocaml version<4.12
+[@@@warning "+9"]
+let x { x } = x
+```
+```mdx-error
+...
+Warning 9: the following labels are not bound in this record pattern:
+y
+Either bind these labels explicitly or add '; _' to the pattern.
+```
+
+```ocaml version>=4.12,version<5.4
+[@@@warning "+9"]
+let x { x } = x
+```
+```mdx-error
+Line 2, characters 9-14:
+Warning 9 [missing-record-field-pattern]: the following labels are not bound in this record pattern:
+y
+Either bind these labels explicitly or add '; _' to the pattern.
+```
+
+```ocaml version>=5.4
+[@@@warning "+9"]
+let x { x } = x
+```
+```mdx-error
+Line 2, characters 9-14:
+Warning 9 [missing-record-field-pattern]: the following labels are not bound
+ in this record pattern: y.
+ Either bind these labels explicitly or add ; _ to the pattern.
+```
+
+Test against some false positives:
+
+```ocaml
+let x = [ "Warning" ]
+```
+
+```ocaml
+module Warning = struct
+ type t = Warning
+end
+
+let warning = Warning.Warning
+```
+
+Intended false positive:
+
+```ocaml
+let x =
+ if true then
+ prerr_endline "Warning: Assert failed";
+ [ "foo" ]
+```
+```mdx-error
+Warning: Assert failed
+```
```
File "test/bin/misc-test-cases/mdx-deps/deps.txt.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/misc-test-cases/mdx-deps/deps.txt.expected _build/default/test/bin/misc-test-cases/mdx-deps/deps.txt
diff --git a/_build/default/test/bin/misc-test-cases/mdx-deps/deps.txt.expected b/_build/default/test/bin/misc-test-cases/mdx-deps/deps.txt
index caaf287..717b4b7 100755
--- a/_build/default/test/bin/misc-test-cases/mdx-deps/deps.txt.expected
+++ b/_build/default/test/bin/misc-test-cases/mdx-deps/deps.txt
@@ -1 +1 @@
-((4:file11:tikitaka.ml)(4:file7:burn.sh)(3:dir5:ping/))
\ No newline at end of file
+((4:file12:tikitaka.ml
))
\ No newline at end of file
File "test/bin/mdx-test/expect/requires/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/expect/requires/test-case.md _build/default/test/bin/mdx-test/expect/requires.actual
diff --git a/_build/default/test/bin/mdx-test/expect/requires/test-case.md b/_build/default/test/bin/mdx-test/expect/requires.actual
index 6656c22..c26177d 100755
--- a/_build/default/test/bin/mdx-test/expect/requires/test-case.md
+++ b/_build/default/test/bin/mdx-test/expect/requires.actual
@@ -1,7 +1,8 @@
-Testing requires directives
-
-```ocaml
-# #require "astring";;
-# #require "foo";;
-No such package: foo
+Testing requires directives
+
+```ocaml
+# #require "astring";;
+# #require "foo";;
+No such package: foo
+```
```
File "test/bin/mdx-test/failure/mixed-label-syntax/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/failure/mixed-label-syntax/test-case.md.expected _build/default/test/bin/mdx-test/failure/mixed-label-syntax.actual
diff --git a/_build/default/test/bin/mdx-test/failure/mixed-label-syntax/test-case.md.expected b/_build/default/test/bin/mdx-test/failure/mixed-label-syntax.actual
index 140dfe0..a6e26c6 100755
--- a/_build/default/test/bin/mdx-test/failure/mixed-label-syntax/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/failure/mixed-label-syntax.actual
@@ -1 +1,2 @@
-[mdx] Fatal error: File "test-case.md", lines 3-9: invalid code block: cannot mix both block labels syntax
+File "test-case.md", lines 4-10: Error in the cram code block
+Blocks must start with a command or similar, not with an output line. Please, make sure that there's no spare empty line, particularly between the output and its input.
File "test/bin/mdx-test/failure/part-unsupported/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/failure/part-unsupported/test-case.md.expected _build/default/test/bin/mdx-test/failure/part-unsupported.actual
diff --git a/_build/default/test/bin/mdx-test/failure/part-unsupported/test-case.md.expected b/_build/default/test/bin/mdx-test/failure/part-unsupported.actual
index 7f89ba0..47981ac 100755
--- a/_build/default/test/bin/mdx-test/failure/part-unsupported/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/failure/part-unsupported.actual
@@ -1 +1 @@
-[mdx] Fatal error: File "test-case.md", lines 3-4: invalid code block: `part` label is not allowed for non-OCaml include blocks.
+[mdx] Fatal error: File "test-case.md", lines 3-5: invalid code block: `part` label is not allowed for non-OCaml include blocks.
File "test/bin/mdx-test/failure/cram-empty-line/test-case.t.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/failure/cram-empty-line/test-case.t.expected _build/default/test/bin/mdx-test/failure/cram-empty-line.actual
diff --git a/_build/default/test/bin/mdx-test/failure/cram-empty-line/test-case.t.expected b/_build/default/test/bin/mdx-test/failure/cram-empty-line.actual
index 37fcc42..919c9ef 100755
--- a/_build/default/test/bin/mdx-test/failure/cram-empty-line/test-case.t.expected
+++ b/_build/default/test/bin/mdx-test/failure/cram-empty-line.actual
@@ -1,2 +1 @@
-File "test-case.t", lines 5-6: Error in the cram code block
-Blocks must start with a command or similar, not with an output line. Please, make sure that there's no spare empty line, particularly between the output and its input.
+[mdx] Fatal error: File "test-case.t", lines 3-4: Failure("lexing: empty token")
File "test/bin/mdx-test/failure/invalid-label/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/failure/invalid-label/test-case.md.expected _build/default/test/bin/mdx-test/failure/invalid-label.actual
diff --git a/_build/default/test/bin/mdx-test/failure/invalid-label/test-case.md.expected b/_build/default/test/bin/mdx-test/failure/invalid-label.actual
index e25a235..1a367f8 100755
--- a/_build/default/test/bin/mdx-test/failure/invalid-label/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/failure/invalid-label.actual
@@ -1 +1 @@
-[mdx] Fatal error: File "test-case.md", lines 3-5: invalid code block: `toto` is not a valid label.
+[mdx] Fatal error: File "test-case.md", lines 3-6: invalid code block: `toto` is not a valid label.
File "test/bin/mdx-test/misc/syntax/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/misc/syntax/test-case.md _build/default/test/bin/mdx-test/misc/syntax/test-case.md.corrected
diff --git a/_build/default/test/bin/mdx-test/misc/syntax/test-case.md b/_build/default/test/bin/mdx-test/misc/syntax/test-case.md.corrected
index 0f79030..14c8417 100755
--- a/_build/default/test/bin/mdx-test/misc/syntax/test-case.md
+++ b/_build/default/test/bin/mdx-test/misc/syntax/test-case.md.corrected
@@ -4,3 +4,4 @@ The syntax of this file is `markdown` and will be inferred by its file extension
# let x = 1 + 1;;
val x : int = 2
```
+```
File "test/bin/mdx-test/misc/output-option/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/misc/output-option/test-case.md _build/default/test/bin/mdx-test/misc/output-option/std-out.corrected
diff --git a/_build/default/test/bin/mdx-test/misc/output-option/test-case.md b/_build/default/test/bin/mdx-test/misc/output-option/std-out.corrected
index 7099e7e..d22ae32 100755
--- a/_build/default/test/bin/mdx-test/misc/output-option/test-case.md
+++ b/_build/default/test/bin/mdx-test/misc/output-option/std-out.corrected
@@ -1,11 +1,12 @@
-`mdx-test` output can be configured via the `--output`/`-o` CLI option. It can be used to write
-to a file or to stdout by passing `--output -`.
-
-When not specified, it should default to `<input_file>.corrected`.
-
-Check the dune file in this folder to see the actual tests!
-
-```ocaml
-# let x = 1 + 1;;
-val x : int = 2
+`mdx-test` output can be configured via the `--output`/`-o` CLI option. It can be used to write
+to a file or to stdout by passing `--output -`.
+
+When not specified, it should default to `<input_file>.corrected`.
+
+Check the dune file in this folder to see the actual tests!
+
+```ocaml
+# let x = 1 + 1;;
+val x : int = 2
+```
```
File "test/bin/mdx-test/failure/invalid-label-value/test-case.md.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/failure/invalid-label-value/test-case.md.expected _build/default/test/bin/mdx-test/failure/invalid-label-value.actual
diff --git a/_build/default/test/bin/mdx-test/failure/invalid-label-value/test-case.md.expected b/_build/default/test/bin/mdx-test/failure/invalid-label-value.actual
index 1d91154..e1d75ee 100755
--- a/_build/default/test/bin/mdx-test/failure/invalid-label-value/test-case.md.expected
+++ b/_build/default/test/bin/mdx-test/failure/invalid-label-value.actual
@@ -1,2 +1,2 @@
-[mdx] Fatal error: File "test-case.md", lines 3-5: invalid code block: "bar" is not a valid value for label `non-deterministic`. Valid values are <none>, "command" and "output".
-[mdx] Fatal error: File "test-case.md", lines 3-5: invalid code block: Label `skip` does not allow a value.
+[mdx] Fatal error: File "test-case.md", lines 3-6: invalid code block: "bar" is not a valid value for label `non-deterministic`. Valid values are <none>, "command" and "output".
+[mdx] Fatal error: File "test-case.md", lines 3-6: invalid code block: Label `skip` does not allow a value.
File "test/bin/mdx-test/misc/output-option/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/misc/output-option/test-case.md _build/default/test/bin/mdx-test/misc/output-option/explicit-outfile.corrected
diff --git a/_build/default/test/bin/mdx-test/misc/output-option/test-case.md b/_build/default/test/bin/mdx-test/misc/output-option/explicit-outfile.corrected
index 7099e7e..b120b08 100755
--- a/_build/default/test/bin/mdx-test/misc/output-option/test-case.md
+++ b/_build/default/test/bin/mdx-test/misc/output-option/explicit-outfile.corrected
@@ -9,3 +9,4 @@ Check the dune file in this folder to see the actual tests!
# let x = 1 + 1;;
val x : int = 2
```
+```
File "test/bin/mdx-test/misc/output-option/test-case.md", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/misc/output-option/test-case.md _build/default/test/bin/mdx-test/misc/output-option/test-case.md.corrected
diff --git a/_build/default/test/bin/mdx-test/misc/output-option/test-case.md b/_build/default/test/bin/mdx-test/misc/output-option/test-case.md.corrected
index 7099e7e..b120b08 100755
--- a/_build/default/test/bin/mdx-test/misc/output-option/test-case.md
+++ b/_build/default/test/bin/mdx-test/misc/output-option/test-case.md.corrected
@@ -9,3 +9,4 @@ Check the dune file in this folder to see the actual tests!
# let x = 1 + 1;;
val x : int = 2
```
+```
File "test/bin/mdx-test/misc/syntax/test-case-md.ext", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-test/misc/syntax/test-case-md.ext _build/default/test/bin/mdx-test/misc/syntax/test-case-md.ext.corrected
diff --git a/_build/default/test/bin/mdx-test/misc/syntax/test-case-md.ext b/_build/default/test/bin/mdx-test/misc/syntax/test-case-md.ext.corrected
index a4a2114..a2f7f53 100755
--- a/_build/default/test/bin/mdx-test/misc/syntax/test-case-md.ext
+++ b/_build/default/test/bin/mdx-test/misc/syntax/test-case-md.ext.corrected
@@ -4,3 +4,4 @@ The syntax of this file is `markdown`, it can't be inferred by its file extensio
# let x = 1 + 1;;
val x : int = 2
```
+```
File "test/bin/mdx-test/misc/inserting-double-semicolon/dune", lines 10-15, characters 0-193:
10 | (rule
11 | (alias runtest)
12 | (deps test-case.expected test-case.actual)
13 | (action
14 | ;; this uses `run diff` deliberately to not allow promotion
15 | (run diff test-case.expected test-case.actual)))
(cd _build/default/test/bin/mdx-test/misc/inserting-double-semicolon && C:\cygwin64\bin\diff.exe test-case.expected test-case.actual)
1,10c1,11
< `;;` is not mandatory at the end of toplevel phrases but will be inserted
< automatically.
<
< ```ocaml
< # let x = 3
< val x : int = 3
< # let f = function
< | 0 -> 1
< | n -> n-1
< val f : int -> int = <fun>
---
> `;;` is not mandatory at the end of toplevel phrases but will be inserted
> automatically.
>
> ```ocaml
> # let x = 3
> val x : int = 3
> # let f = function
> | 0 -> 1
> | n -> n-1
> val f : int -> int = <fun>
> ```
File "test/bin/misc-test-cases/mdx-pp-execute/section.out.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/misc-test-cases/mdx-pp-execute/section.out.expected _build/default/test/bin/misc-test-cases/mdx-pp-execute/section.out
diff --git a/_build/default/test/bin/misc-test-cases/mdx-pp-execute/section.out.expected b/_build/default/test/bin/misc-test-cases/mdx-pp-execute/section.out
index 294d779..e69de29 100755
--- a/_build/default/test/bin/misc-test-cases/mdx-pp-execute/section.out.expected
+++ b/_build/default/test/bin/misc-test-cases/mdx-pp-execute/section.out
@@ -1,3 +0,0 @@
-1
-2
-3
File "test/bin/mdx-pp/misc/compile/output.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-pp/misc/compile/output.expected _build/default/test/bin/mdx-pp/misc/compile/output.actual
diff --git a/_build/default/test/bin/mdx-pp/misc/compile/output.expected b/_build/default/test/bin/mdx-pp/misc/compile/output.actual
index ef0493b..e69de29 100755
--- a/_build/default/test/bin/mdx-pp/misc/compile/output.expected
+++ b/_build/default/test/bin/mdx-pp/misc/compile/output.actual
@@ -1 +0,0 @@
-hello
File "test/bin/mdx-dune-gen/misc/non-deterministic/dune-mdx-nondeterministic.expected", line 1, characters 0-0:
C:\cygwin64\bin\git.exe --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/test/bin/mdx-dune-gen/misc/non-deterministic/dune-mdx-nondeterministic.expected _build/default/test/bin/mdx-dune-gen/misc/non-deterministic/dune-mdx-nondeterministic.deterministic
diff --git a/_build/default/test/bin/mdx-dune-gen/misc/non-deterministic/dune-mdx-nondeterministic.expected b/_build/default/test/bin/mdx-dune-gen/misc/non-deterministic/dune-mdx-nondeterministic.deterministic
index 8f7c102..372adfc 100755
--- a/_build/default/test/bin/mdx-dune-gen/misc/non-deterministic/dune-mdx-nondeterministic.expected
+++ b/_build/default/test/bin/mdx-dune-gen/misc/non-deterministic/dune-mdx-nondeterministic.deterministic
@@ -1,18 +1,19 @@
-This test checks whether the non-deterministic mode works with the `dune` `mdx`
-stanza.
-
-Deterministic stanzas should get run and corrected, as for 1 plus one is not 3:
-
-```ocaml
-# 1 + 1;;
-- : int = 2
-```
-
-Non-deterministic ones should not be updated, since whatever `Random` outputs
-should be random:
-
-<!-- $MDX non-deterministic=command -->
-```ocaml
-# Random.int 1000;;
-- : int = 42
+This test checks whether the non-deterministic mode works with the `dune` `mdx`
+stanza.
+
+Deterministic stanzas should get run and corrected, as for 1 plus one is not 3:
+
+```ocaml
+# 1 + 1;;
+- : int = 42
+```
+
+Non-deterministic ones should not be updated, since whatever `Random` outputs
+should be random:
+
+<!-- $MDX non-deterministic=command -->
+```ocaml
+# Random.int 1000;;
+- : int = 42
+```
```
"C:\cygwin64\bin\bash.exe" "-lc" "cd /home/opam/src && opam exec -- dune build @install @check @runtest && rm -rf _build" failed with exit status 1
2026-03-20 08:26.56: Job failed: Failed: Build failed