Skip to content

Commit 31f55ab

Browse files
committed
Test: cover empty parent id
1 parent 027cee8 commit 31f55ab

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

test/parent_id/dune

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
(env
2+
(_
3+
(binaries
4+
(../odoc_print/odoc_print.exe as odoc_print))))
5+
16
(cram
2-
(deps %{bin:odoc}))
7+
(deps %{bin:odoc} %{bin:odoc_print}))
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$ echo "{0 Test}" > file.mld
2+
3+
It is possible to have pages with no parent, even with the odoc 3 "parent-id"
4+
argument. In this case, an empty string is passed as argument.
5+
6+
$ odoc compile --parent-id "" --output-dir _odoc file.mld
7+
$ ls _odoc
8+
page-file.odoc
9+
$ odoc_print _odoc/page-file.odoc | jq ".name"
10+
{
11+
"`LeafPage": [
12+
"None",
13+
"file"
14+
]
15+
}

0 commit comments

Comments
 (0)