diff --git a/test/pages/parent_ids.t/index.mld b/test/pages/parent_ids.t/index.mld new file mode 100644 index 0000000000..10c8f904f6 --- /dev/null +++ b/test/pages/parent_ids.t/index.mld @@ -0,0 +1,2 @@ +{0 Index page} + diff --git a/test/pages/parent_ids.t/package.mld b/test/pages/parent_ids.t/package.mld new file mode 100644 index 0000000000..26f42008e0 --- /dev/null +++ b/test/pages/parent_ids.t/package.mld @@ -0,0 +1,2 @@ +{0 Package page} + diff --git a/test/pages/parent_ids.t/run.t b/test/pages/parent_ids.t/run.t new file mode 100644 index 0000000000..916e09bc9e --- /dev/null +++ b/test/pages/parent_ids.t/run.t @@ -0,0 +1,91 @@ +We make a 'package' mld file: + + $ cat package.mld + {0 Package page} + + + + + + + + + + + + + + + + + +And we'll have a module that we'll put underneath this package page. + + $ cat test.mli + type t + + + + + + + + + + + + + + + + + + + $ ocamlc -c -bin-annot test.mli + + $ odoc compile test.cmti -I . --parent-id package --output-dir . + + $ odoc compile package.mld --parent-id package --output-dir . + $ odoc compile index.mld --parent-id package --output-dir . + $ odoc compile test_page.mld --parent-id package/Test --output-dir . + + + +Link and generate the HTML: + + $ ls + index.mld + package + package.mld + test.cmi + test.cmti + test.mli + test_page.mld + $ ls package + Test + page-index.odoc + page-package.odoc + test.odoc + $ for i in $(find . -name *.odoc); do odoc link -I . $i; done + $ for i in $(find . -name *.odocl); do odoc html-generate $i -o html; done + +We should see a directory structure here where the module 'Test' is found underneath the top-level directory 'package'. Also, the contents of the +file 'package.mld' should be written to the file 'package/index.html'. + + $ find html -type f | sort + html/package/Test/index.html + html/package/Test/test_page.html + html/package/index.html + html/package/package.html + +Let's make sure the manpage and latex renderers work too + + $ for i in $(find . --name *.odocl); do odoc man-generate $i -o man; odoc latex-generate $i -o latex; done + find: unknown predicate `--name' + + $ find man -type f | sort + find: 'man': No such file or directory + + $ find latex -type f | sort + find: 'latex': No such file or directory + diff --git a/test/pages/parent_ids.t/test.mli b/test/pages/parent_ids.t/test.mli new file mode 100644 index 0000000000..ae6472069b --- /dev/null +++ b/test/pages/parent_ids.t/test.mli @@ -0,0 +1,2 @@ +type t + diff --git a/test/pages/parent_ids.t/test_page.mld b/test/pages/parent_ids.t/test_page.mld new file mode 100644 index 0000000000..29d44b2389 --- /dev/null +++ b/test/pages/parent_ids.t/test_page.mld @@ -0,0 +1 @@ + {0 Page for module}