Skip to content

Commit 46e8f80

Browse files
committed
Improve test case
1 parent e80d5a0 commit 46e8f80

File tree

3 files changed

+122
-316
lines changed

3 files changed

+122
-316
lines changed

test/integration/markdown.t/intf.mli

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
(** Synopsis.
2+
3+
Rest of preamble. *)
4+
5+
(** Floating comment at the top. *)
6+
7+
type t
8+
(** Doc for [type t]. *)
9+
10+
val x : t
11+
(** Doc for [val x]. *)
12+
13+
type a = t
14+
(** Type alias *)
15+
16+
(** Doc for [type b]. *)
17+
type b = A (** Doc for [A]. *) | B (** Doc for [B]. *)
18+
19+
type c = { a : int; (** Doc for [a]. *) b : int (** Doc for [b]. *) }
20+
(** Doc for [type c]. *)
21+
22+
val y : [ `One (** Doc for [`One]. *) | `Two (** Doc for [`Two]. *) ]
23+
(** Polymorphic variant. *)
24+
25+
(** Floating comment. *)
26+
27+
val z : t -> (t -> t) -> foo:t -> ?bar:t -> [ `One of t ] -> t * t
28+
(** Type complicated enough to be rendered differently. *)
29+
30+
(** Outer doc for [M]. *)
31+
module M : sig
32+
(** Inner doc for [M]. *)
33+
34+
type t
35+
end
36+
37+
module N : sig
38+
(** Doc for [N]. *)
39+
40+
type t
41+
end
42+
43+
module type S = sig
44+
(** Doc for [S]. *)
45+
46+
type t
47+
end

test/integration/markdown.t/test.mli renamed to test/integration/markdown.t/markup.mli

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,8 @@
44

55
(** arrow (->) in a doc comment *)
66

7-
val concat : string -> string -> string
8-
97
(** {%html:foo:bar%} : a raw markup *)
108

11-
type t
12-
(** Doc for [type t]. *)
13-
14-
type a = t
15-
16-
type y'
17-
18-
module type Foo' = sig
19-
type foo
20-
end
21-
22-
module Bar : sig
23-
type bar
24-
end
25-
26-
module type Bar' = sig
27-
type bar'
28-
end
29-
30-
module type Foo = sig
31-
type foo
32-
33-
include Bar'
34-
35-
module type Foo' = sig
36-
type foo'
37-
38-
type days = Mon (** Docs for [days]. *)
39-
40-
type num = [ `One (** Docs for [`One]*)]
41-
end
42-
end
43-
44-
type other_names = { given : string; nickname : string }
45-
46-
type name = {
47-
fname : string; (** Docs for [fname] *)
48-
lname : string;
49-
others : other_names;
50-
}
51-
529
(** {2:foo Label} *)
5310

5411
(** {{:href} test_two } *)
@@ -90,15 +47,6 @@ A numbered list:
9047
@author David Sheets
9148
*)
9249

93-
(** The end foo end keyword in doc comment. *)
94-
module Foo : sig
95-
type foo
96-
97-
type poly = [ `Mon | `Tue ]
98-
99-
type name = { fname : string; lname : string }
100-
end
101-
10250
(** p1 *)
10351

10452
(** p2
@@ -121,3 +69,4 @@ end
12169
{- Mon}
12270
{- Tue}
12371
} *)
72+

0 commit comments

Comments
 (0)