Improve odoc tests to test wrapped and non wrapped module listings

This commit is contained in:
Rudi Grinberg 2018-04-03 00:46:48 +08:00
parent f29ff0945d
commit 244773ef80
4 changed files with 25 additions and 2 deletions

View File

@ -2,10 +2,15 @@
(library
((name foo)
(modules (foo))
(modules (foo foo2))
(wrapped false)
(public_name foo)))
(library
((name bar)
(public_name bar)
(modules (bar))))
(library
((name foo_byte)
(modules (foo_byte))
@ -21,3 +26,8 @@
((name foo-mld)
(deps (_doc/_mlds/foo/index.mld))
(action (echo "${read:_doc/_mlds/foo/index.mld}"))))
(alias
((name bar-mld)
(deps (_doc/_mlds/bar/index.mld))
(action (echo "${read:_doc/_mlds/bar/index.mld}"))))

View File

@ -1,4 +1,8 @@
$ $JBUILDER build @doc -j1 --display short --root .
ocamldep bar.ml.d
ocamlc .bar.objs/bar.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/bar/bar.odoc
odoc _doc/_html/bar/Bar/.jbuilder-keep,_doc/_html/bar/Bar/index.html
odoc _doc/_odoc/pkg/bar/page-index.odoc
odoc _doc/_html/bar/index.html
odoc _doc/_html/odoc.css
@ -8,10 +12,14 @@
ocamldep foo_byte.ml.d
ocamlc .foo_byte.objs/foo_byte.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/foo.byte/foo_byte.odoc
ocamldep foo2.ml.d
ocamlc .foo.objs/foo2.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/foo/foo2.odoc
odoc _doc/_html/foo/Foo/.jbuilder-keep,_doc/_html/foo/Foo/index.html
odoc _doc/_odoc/pkg/foo/page-index.odoc
odoc _doc/_html/foo/index.html
odoc _doc/_html/foo/Foo_byte/.jbuilder-keep,_doc/_html/foo/Foo_byte/index.html
odoc _doc/_html/foo/Foo2/.jbuilder-keep,_doc/_html/foo/Foo2/index.html
$ $JBUILDER runtest -j1 --display short --root .
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -35,7 +43,12 @@
$ $JBUILDER build @foo-mld -j1 --display short --root .
{1 Library foo}
This library exposes the following toplevel modules:
{!modules:Foo}
{!modules:Foo Foo2}
{1 Library foo.byte}
This library exposes the following toplevel modules:
{!modules:Foo_byte}
$ $JBUILDER build @bar-mld -j1 --display short --root .
{1 Library bar}
This library exposes the following toplevel modules:
{!modules:Bar}