Add odoc generation tests
This commit is contained in:
parent
451a6d34af
commit
d53f26c841
|
@ -113,3 +113,11 @@
|
|||
(action
|
||||
(chdir test-cases/reason
|
||||
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t))))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((files_recursively_in test-cases/odoc)))
|
||||
(action
|
||||
(chdir test-cases/odoc
|
||||
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t))))))
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(library
|
||||
((name foo)
|
||||
(modules (foo))
|
||||
(wrapped false)
|
||||
(public_name foo)))
|
||||
|
||||
(library
|
||||
((name foo_byte)
|
||||
(modules (foo_byte))
|
||||
(modes (byte))
|
||||
(public_name foo.byte)))
|
||||
|
||||
(executables
|
||||
((names (bar))
|
||||
(modules (bar))
|
||||
(public_names (bar))
|
||||
(libraries (foo))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps (_doc/index.html))
|
||||
(action (echo "${read:_doc/index.html}"))))
|
|
@ -0,0 +1,32 @@
|
|||
$ $JBUILDER build @doc -j1 --root .
|
||||
ocamldep foo_byte.depends.ocamldep-output
|
||||
ocamldep foo_byte.dependsi.ocamldep-output
|
||||
ocamldep foo.depends.ocamldep-output
|
||||
ocamldep foo.dependsi.ocamldep-output
|
||||
odoc _doc/odoc.css
|
||||
ocamlc foo_byte.{cmi,cmo,cmt}
|
||||
ocamlc foo.{cmi,cmo,cmt}
|
||||
odoc foo_byte.odoc
|
||||
odoc foo.odoc
|
||||
odoc _doc/foo.byte/index.html
|
||||
odoc _doc/foo.byte/Foo_byte/.jbuilder-keep,_doc/foo.byte/Foo_byte/index.html
|
||||
odoc _doc/foo/index.html
|
||||
odoc _doc/foo/Foo/.jbuilder-keep,_doc/foo/Foo/index.html
|
||||
$ $JBUILDER runtest -j1 --root .
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>index</title>
|
||||
<link rel="stylesheet" href="./odoc.css"/>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="by-name">
|
||||
<h2>OCaml package documentation</h2>
|
||||
<ol>
|
||||
<li><a href="foo/index.html">foo</a></li>
|
||||
<li><a href="foo.byte/index.html">foo.byte</a></li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue