diff --git a/test/parent_id/dune b/test/parent_id/dune index 36d06be450..3d43ccd34c 100644 --- a/test/parent_id/dune +++ b/test/parent_id/dune @@ -1,2 +1,7 @@ +(env + (_ + (binaries + (../odoc_print/odoc_print.exe as odoc_print)))) + (cram - (deps %{bin:odoc})) + (deps %{bin:odoc} %{bin:odoc_print})) diff --git a/test/parent_id/empty_parent_id.t/run.t b/test/parent_id/empty_parent_id.t/run.t new file mode 100644 index 0000000000..deaf1a95cd --- /dev/null +++ b/test/parent_id/empty_parent_id.t/run.t @@ -0,0 +1,15 @@ + $ echo "{0 Test}" > file.mld + +It is possible to have pages with no parent, even with the odoc 3 "parent-id" +argument. In this case, an empty string is passed as argument. + + $ odoc compile --parent-id "" --output-dir _odoc file.mld + $ ls _odoc + page-file.odoc + $ odoc_print _odoc/page-file.odoc | jq ".name" + { + "`LeafPage": [ + "None", + "file" + ] + }