Skip to content

Commit eb2cceb

Browse files
asavahistajonludlam
authored andcommitted
add test for mld line numbers
1 parent e503a0c commit eb2cceb

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{0 line numbers}
2+
{[]}
3+
4+
5+
6+
7+
8+
{Bad Markup}
9+
10+
11+
12+
13+
14+
15+
16+
{6 heading}
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
{syntax error

test/integration/compile.t/run.t

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,17 @@ Compiling a '.cmt' file.
168168

169169
$ ocamlc -bin-annot -c impl_only.ml
170170
$ odoc compile --package foo impl_only.cmt
171+
172+
Check line numbers for errors in a '.mld' file.
173+
174+
$ odoc compile line_numbers.mld
175+
File "line_numbers.mld", line 2, characters 0-4:
176+
'{[...]}' (code block) should not be empty.
177+
File "line_numbers.mld", line 8, characters 0-12:
178+
'{Bad Markup}': bad markup.
179+
Suggestion: did you mean '{!Bad Markup}' or '[Bad Markup]'?
180+
File "line_numbers.mld", line 32, characters 0-1:
181+
'{': bad markup.
182+
Suggestion: escape the brace with '\{'.
183+
File "line_numbers.mld", line 16, characters 0-11:
184+
'6': bad heading level (0-5 allowed).

0 commit comments

Comments
 (0)