Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/generators/cases/oxcaml_impl.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let[@zero_alloc] add b x y = if b then x + y else x
1 change: 1 addition & 0 deletions test/generators/gen_rules/gen_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ let constraints =
("functor_ml.ml", Min "4.14");
("ocaml_55.mli", Min "5.5");
("oxcaml.mli", OxCaml);
("oxcaml_impl.ml", OxCaml);
]

let test_cases_dir = Fpath.v "cases"
Expand Down
32 changes: 32 additions & 0 deletions test/generators/html/Oxcaml_impl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Oxcaml_impl (Oxcaml_impl)</title><meta charset="utf-8"/>
<link rel="stylesheet" href="odoc.css"/>
<meta name="generator" content="odoc %%VERSION%%"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
<script src="highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="odoc">
<nav class="odoc-nav"><a href="index.html">Up</a> –
<a href="index.html">Index</a> &#x00BB; Oxcaml_impl
</nav>
<header class="odoc-preamble">
<h1>Module <code><span>Oxcaml_impl</span></code></h1>
</header>
<div class="odoc-content">
<div class="odoc-spec">
<div class="spec value anchored" id="val-add">
<a href="#val-add" class="anchor"></a>
<code>
<span><span class="keyword">val</span> add :
<span>bool <span class="arrow">&#45;&gt;</span></span>
<span>int <span class="arrow">&#45;&gt;</span></span>
<span>int <span class="arrow">&#45;&gt;</span></span> int
</span>
</code>
</div>
</div>
</div>
</body>
</html>
Empty file.
1 change: 1 addition & 0 deletions test/generators/html/oxcaml_impl.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Oxcaml_impl.html
Empty file.
4 changes: 4 additions & 0 deletions test/generators/latex/Oxcaml_impl.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\section{Module \ocamlinlinecode{Oxcaml\_\allowbreak{}impl}}\label{Oxcaml_impl}%
\label{Oxcaml_impl--val-add}\ocamlcodefragment{\ocamltag{keyword}{val} add : bool \ocamltag{arrow}{$\rightarrow$} int \ocamltag{arrow}{$\rightarrow$} int \ocamltag{arrow}{$\rightarrow$} int}\\


1 change: 1 addition & 0 deletions test/generators/latex/oxcaml_impl.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Oxcaml_impl.tex
179 changes: 179 additions & 0 deletions test/generators/link.dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,27 @@
(run odoc link -o %{target} %{dep:oxcaml.odoc}))
(enabled_if %{ocaml-config:ox}))

(rule
(target oxcaml_impl.cmt)
(package odoc)
(action
(run ocamlc -c -bin-annot -o %{target} %{dep:cases/oxcaml_impl.ml}))
(enabled_if %{ocaml-config:ox}))

(rule
(target oxcaml_impl.odoc)
(package odoc)
(action
(run odoc compile -o %{target} %{dep:oxcaml_impl.cmt}))
(enabled_if %{ocaml-config:ox}))

(rule
(target oxcaml_impl.odocl)
(package odoc)
(action
(run odoc link -o %{target} %{dep:oxcaml_impl.odoc}))
(enabled_if %{ocaml-config:ox}))

(rule
(target recent.cmti)
(package odoc)
Expand Down Expand Up @@ -12060,6 +12081,164 @@
(diff oxcaml.targets oxcaml.targets.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
html
(rule
(targets Oxcaml_impl.html.gen)
(package odoc)
(action
(run
odoc
html-generate
--indent
--flat
--extra-suffix
gen
-o
.
%{dep:../oxcaml_impl.odocl}))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff Oxcaml_impl.html Oxcaml_impl.html.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
html
(rule
(target oxcaml_impl.targets.gen)
(package odoc)
(action
(with-outputs-to
oxcaml_impl.targets.gen
(run odoc html-targets -o . %{dep:../oxcaml_impl.odocl} --flat)))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff oxcaml_impl.targets oxcaml_impl.targets.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
latex
(rule
(targets Oxcaml_impl.tex.gen)
(package odoc)
(action
(run
odoc
latex-generate
-o
.
--extra-suffix
gen
%{dep:../oxcaml_impl.odocl}))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff Oxcaml_impl.tex Oxcaml_impl.tex.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
latex
(rule
(target oxcaml_impl.targets.gen)
(package odoc)
(action
(with-outputs-to
oxcaml_impl.targets.gen
(run odoc latex-targets -o . %{dep:../oxcaml_impl.odocl})))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff oxcaml_impl.targets oxcaml_impl.targets.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
man
(rule
(targets Oxcaml_impl.3o.gen)
(package odoc)
(action
(run
odoc
man-generate
-o
.
--extra-suffix
gen
%{dep:../oxcaml_impl.odocl}))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff Oxcaml_impl.3o Oxcaml_impl.3o.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
man
(rule
(target oxcaml_impl.targets.gen)
(package odoc)
(action
(with-outputs-to
oxcaml_impl.targets.gen
(run odoc man-targets -o . %{dep:../oxcaml_impl.odocl})))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff oxcaml_impl.targets oxcaml_impl.targets.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
markdown
(rule
(targets Oxcaml_impl.md.gen)
(package odoc)
(action
(run
odoc
markdown-generate
-o
.
--extra-suffix
gen
%{dep:../oxcaml_impl.odocl}))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff Oxcaml_impl.md Oxcaml_impl.md.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
markdown
(rule
(target oxcaml_impl.targets.gen)
(package odoc)
(action
(with-outputs-to
oxcaml_impl.targets.gen
(run odoc markdown-targets -o . %{dep:../oxcaml_impl.odocl})))
(enabled_if %{ocaml-config:ox}))
(rule
(alias runtest)
(package odoc)
(action
(diff oxcaml_impl.targets oxcaml_impl.targets.gen))
(enabled_if %{ocaml-config:ox})))

(subdir
html
(rule
Expand Down
14 changes: 14 additions & 0 deletions test/generators/man/Oxcaml_impl.3o
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

.TH Oxcaml_impl 3 "" "Odoc" "OCaml Library"
.SH Name
Oxcaml_impl
.SH Synopsis
.sp
.in 2
\fBModule Oxcaml_impl\fR
.in
.sp
.SH Documentation
.sp
.nf
\f[CB]val\fR add : bool \f[CB]\->\fR int \f[CB]\->\fR int \f[CB]\->\fR int
1 change: 1 addition & 0 deletions test/generators/man/oxcaml_impl.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Oxcaml_impl.3o
6 changes: 6 additions & 0 deletions test/generators/markdown/Oxcaml_impl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# Module `Oxcaml_impl`

```ocaml
val add : bool -> int -> int -> int
```
1 change: 1 addition & 0 deletions test/generators/markdown/oxcaml_impl.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Oxcaml_impl.md
Loading