This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,5 @@
let bar_eo = 13
let bar_eu = 14
let bar_ou = "lorem"

View file

@ -0,0 +1,32 @@
(library
(name foo)
(modules foo foo2 foo3)
(wrapped false)
(private_modules foo3)
(public_name foo))
(library
(name bar)
(public_name bar)
(modules bar))
(library
(name foo_byte)
(modules foo_byte)
(modes byte)
(public_name foo.byte))
(alias
(name runtest)
(deps _doc/_html/index.html)
(action (echo "%{read:_doc/_html/index.html}")))
(alias
(name foo-mld)
(deps _doc/_mlds/foo/index.mld)
(action (echo "%{read:_doc/_mlds/foo/index.mld}")))
(alias
(name bar-mld)
(deps _doc/_mlds/bar/index.mld)
(action (echo "%{read:_doc/_mlds/bar/index.mld}")))

View file

@ -0,0 +1,5 @@
let foo_eo = 13
let foo_eu = 14
let foo_ou = "lorem"

View file

@ -0,0 +1,5 @@
let foo_byte_eo = 13
let foo_byte_eu = 14
let foo_byte_ou = "lorem"

View file

@ -0,0 +1,69 @@
This test generates documentation using odoc for a library:
$ dune build @doc
This test if `.odocl` files are generated
$ find _build/default/_doc/_odocls -name '*.odocl' | sort -n
_build/default/_doc/_odocls/bar/bar.odocl
_build/default/_doc/_odocls/bar/page-index.odocl
_build/default/_doc/_odocls/foo/foo.odocl
_build/default/_doc/_odocls/foo/foo2.odocl
_build/default/_doc/_odocls/foo/foo_byte.odocl
_build/default/_doc/_odocls/foo/page-index.odocl
$ find . -name '*.js' | sort -n
./_build/default/_doc/_html/bar/db.js
./_build/default/_doc/_html/foo/db.js
./_build/default/_doc/_html/odoc.support/highlight.pack.js
./_build/default/_doc/_html/odoc.support/katex.min.js
./_build/default/_doc/_html/odoc.support/odoc_search.js
./_build/default/_doc/_html/sherlodoc.js
$ cat ./_build/default/_doc/_html/bar/db.js
/* Sherlodoc DB for: */
/* - ../../_odocls/bar/page-index.odocl */
/* - --favored ../../_odocls/bar/bar.odocl */
$ cat ./_build/default/_doc/_html/foo/db.js
/* Sherlodoc DB for: */
/* - ../../_odocls/foo/page-index.odocl */
/* - --favored ../../_odocls/foo/foo_byte.odocl */
/* - --favored ../../_odocls/foo/foo2.odocl */
/* - --favored ../../_odocls/foo/foo.odocl */
$ dune runtest
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>index</title>
<link rel="stylesheet" href="./odoc.support/odoc.css"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
</head>
<body>
<main class="content">
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="bar/index.html">bar</a></li>
<li><a href="foo/index.html">foo</a></li>
</ol>
</div>
</main>
</body>
</html>
$ dune build @foo-mld
{0 foo index}
{1 Library foo}
This library exposes the following toplevel modules:
{!modules:Foo Foo2}
{1 Library foo.byte}
The entry point of this library is the module:
{!module-Foo_byte}.
$ dune build @bar-mld
{0 bar index}
{1 Library bar}
The entry point of this library is the module:
{!module-Bar}.

View file

@ -0,0 +1 @@
this is an mld file