From cf4c0425d2c7a17551eddf3891e36d1b6196cf34 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Thu, 25 Jul 2024 15:08:24 +0200 Subject: [PATCH] test: Reproduction for #1173 --- test/generators/cases/bugs.ml | 2 ++ test/generators/html/Bugs.html | 23 +++++++++++++++++++++++ test/generators/latex/Bugs.tex | 2 ++ test/generators/man/Bugs.3o | 7 +++++++ 4 files changed, 34 insertions(+) diff --git a/test/generators/cases/bugs.ml b/test/generators/cases/bugs.ml index 2c9c30bbd7..cece024dc8 100644 --- a/test/generators/cases/bugs.ml +++ b/test/generators/cases/bugs.ml @@ -3,3 +3,5 @@ let foo (type a) ?(bar : a opt) () = () (** Triggers an assertion failure when {:https://github.com/ocaml/odoc/issues/101} is not fixed. *) +let repeat x y = (x, y, x, y) +(** Renders as [val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f] before https://github.com/ocaml/odoc/pull/1173 *) diff --git a/test/generators/html/Bugs.html b/test/generators/html/Bugs.html index 50e7220735..adebafbcf6 100644 --- a/test/generators/html/Bugs.html +++ b/test/generators/html/Bugs.html @@ -40,6 +40,29 @@

Module Bugs

+
+
+ + + val repeat : + 'a + -> + + 'b + -> + 'c * + 'd * 'e + * 'f + + +
+
+

Renders as + val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f before + https://github.com/ocaml/odoc/pull/1173 +

+
+
diff --git a/test/generators/latex/Bugs.tex b/test/generators/latex/Bugs.tex index 97dcb9cf62..940deec7b6 100644 --- a/test/generators/latex/Bugs.tex +++ b/test/generators/latex/Bugs.tex @@ -2,5 +2,7 @@ \section{Module \ocamlinlinecode{Bugs}}\label{module-Bugs}% \label{module-Bugs-type-opt}\ocamlcodefragment{\ocamltag{keyword}{type} 'a opt = \ocamltag{type-var}{'a} option}\\ \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}% \medbreak +\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}% +\medbreak diff --git a/test/generators/man/Bugs.3o b/test/generators/man/Bugs.3o index 18c7d5cd0c..7e4f924d0e 100644 --- a/test/generators/man/Bugs.3o +++ b/test/generators/man/Bugs.3o @@ -23,4 +23,11 @@ https://github\.com/ocaml/odoc/issues/101 .UE is not fixed\. .nf +.sp +\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 +.fi +.br +.ti +2 +Renders as val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f before https://github\.com/ocaml/odoc/pull/1173 +.nf