Skip to content

Commit 14da78f

Browse files
Julowjonludlam
authored andcommitted
test: Reproduction for #1173
1 parent 6854913 commit 14da78f

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

test/generators/cases/bugs.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ let foo (type a) ?(bar : a opt) () = ()
33
(** Triggers an assertion failure when
44
{:https://github.com/ocaml/odoc/issues/101} is not fixed. *)
55

6+
let repeat x y = (x, y, x, y)
7+
(** Renders as [val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f] before https://github.com/ocaml/odoc/pull/1173 *)

test/generators/html/Bugs.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,29 @@ <h1>Module <code><span>Bugs</span></code></h1>
4040
</p>
4141
</div>
4242
</div>
43+
<div class="odoc-spec">
44+
<div class="spec value anchored" id="val-repeat">
45+
<a href="#val-repeat" class="anchor"></a>
46+
<code>
47+
<span><span class="keyword">val</span> repeat :
48+
<span><span class="type-var">'a</span>
49+
<span class="arrow">&#45;&gt;</span>
50+
</span>
51+
<span><span class="type-var">'b</span>
52+
<span class="arrow">&#45;&gt;</span>
53+
</span> <span class="type-var">'c</span> *
54+
<span class="type-var">'d</span> * <span class="type-var">'e</span>
55+
* <span class="type-var">'f</span>
56+
</span>
57+
</code>
58+
</div>
59+
<div class="spec-doc">
60+
<p>Renders as
61+
<code>val repeat : 'a -&gt; 'b -&gt; 'c * 'd * 'e * 'f</code> before
62+
https://github.com/ocaml/odoc/pull/1173
63+
</p>
64+
</div>
65+
</div>
4366
</div>
4467
</body>
4568
</html>

test/generators/latex/Bugs.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ \section{Module \ocamlinlinecode{Bugs}}\label{module-Bugs}%
22
\label{module-Bugs-type-opt}\ocamlcodefragment{\ocamltag{keyword}{type} 'a opt = \ocamltag{type-var}{'a} option}\\
33
\label{module-Bugs-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : \ocamltag{optlabel}{?bar}:\ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Triggers an assertion failure when \href{https://github.com/ocaml/odoc/issues/101}{https://github.com/ocaml/odoc/issues/101}\footnote{\url{https://github.com/ocaml/odoc/issues/101}} is not fixed.\end{ocamlindent}%
44
\medbreak
5+
\label{module-Bugs-val-repeat}\ocamlcodefragment{\ocamltag{keyword}{val} repeat : \ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'b} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'c} * \ocamltag{type-var}{'d} * \ocamltag{type-var}{'e} * \ocamltag{type-var}{'f}}\begin{ocamlindent}Renders as \ocamlinlinecode{val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f} before https://github.com/ocaml/odoc/pull/1173\end{ocamlindent}%
6+
\medbreak
57

68

test/generators/man/Bugs.3o

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@ https://github\.com/ocaml/odoc/issues/101
2323
.UE
2424
is not fixed\.
2525
.nf
26+
.sp
27+
\f[CB]val\fR repeat : \f[CB]'a\fR \f[CB]\->\fR \f[CB]'b\fR \f[CB]\->\fR \f[CB]'c\fR * \f[CB]'d\fR * \f[CB]'e\fR * \f[CB]'f\fR
28+
.fi
29+
.br
30+
.ti +2
31+
Renders as val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f before https://github\.com/ocaml/odoc/pull/1173
32+
.nf
2633

0 commit comments

Comments
 (0)