Skip to content

Commit 9700c17

Browse files
committed
Add test for raise tag exception linking
1 parent c7de5c8 commit 9700c17

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

src/ocamlary/ocamlary.mli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ val fun_maybe : ?yes:unit -> unit -> int
226226
val not_found : unit -> unit
227227
(** @raise Not_found That's all it does *)
228228

229+
val kaboom : unit -> unit
230+
(** @raise Kaboom That's all it does *)
231+
229232
val ocaml_org : string
230233
(** @see <http://ocaml.org/> The OCaml Web site *)
231234

test/generators/html/Ocamlary.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,24 @@ <h4 id="basic-type-and-value-stuff-with-advanced-doc-comments">
452452
</ul>
453453
</div>
454454
</div>
455+
<div class="odoc-spec">
456+
<div class="spec value anchored" id="val-kaboom">
457+
<a href="#val-kaboom" class="anchor"></a>
458+
<code>
459+
<span><span class="keyword">val</span> kaboom :
460+
<span>unit <span class="arrow">&#45;&gt;</span></span> unit
461+
</span>
462+
</code>
463+
</div>
464+
<div class="spec-doc">
465+
<ul class="at-tags">
466+
<li class="raises"><span class="at-tag">raises</span>
467+
<a href="#exception-Kaboom"><code>Kaboom</code></a>
468+
<p>That's all it does</p>
469+
</li>
470+
</ul>
471+
</div>
472+
</div>
455473
<div class="odoc-spec">
456474
<div class="spec value anchored" id="val-ocaml_org">
457475
<a href="#val-ocaml_org" class="anchor"></a>

test/generators/latex/Ocamlary.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ \subsubsection{Basic type and value stuff with advanced doc comments\label{basic
150150
\item[{raises \ocamlinlinecode{Not\_\allowbreak{}found}}]{That's all it does}\end{description}%
151151
\end{ocamlindent}%
152152
\medbreak
153+
\label{module-Ocamlary-val-kaboom}\ocamlcodefragment{\ocamltag{keyword}{val} kaboom : unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}\begin{description}\kern-\topsep
154+
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
155+
\item[{raises \hyperref[module-Ocamlary-exception-Kaboom]{\ocamlinlinecode{\ocamlinlinecode{Kaboom}}}}]{That's all it does}\end{description}%
156+
\end{ocamlindent}%
157+
\medbreak
153158
\label{module-Ocamlary-val-ocaml_org}\ocamlcodefragment{\ocamltag{keyword}{val} ocaml\_\allowbreak{}org : string}\begin{ocamlindent}\begin{description}\kern-\topsep
154159
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
155160
\item[{see \href{http://ocaml.org/}{http://ocaml.org/}\footnote{\url{http://ocaml.org/}}}]{The OCaml Web site}\end{description}%

test/generators/man/Ocamlary.3o

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,13 @@ This is a_function with param and return type\.
391391
@raises Not_found: That's all it does
392392
.nf
393393
.sp
394+
\f[CB]val\fR kaboom : unit \f[CB]\->\fR unit
395+
.fi
396+
.br
397+
.ti +2
398+
@raises \f[CI]Kaboom\fR: That's all it does
399+
.nf
400+
.sp
394401
\f[CB]val\fR ocaml_org : string
395402
.fi
396403
.br

0 commit comments

Comments
 (0)