diff --git a/test/generators/html_opts.t/run.t b/test/integration/html_opts.t/run.t
similarity index 94%
rename from test/generators/html_opts.t/run.t
rename to test/integration/html_opts.t/run.t
index e552af1278..e603abceb0 100644
--- a/test/generators/html_opts.t/run.t
+++ b/test/integration/html_opts.t/run.t
@@ -6,6 +6,9 @@
$ odoc link test2.odoc
$ odoc html-generate test.odocl -o html --indent
+ $ odoc html-targets test.odocl -o html --indent
+ html/test/Test/index.html
+
This should have the breadcrumbs in it as a nav with id 'odoc-nav'. Let's also
check it's got the expected content by looking for 'type-t'
@@ -18,7 +21,7 @@ check it's got the expected content by looking for 'type-t'
Generate --as-json embeddable HTML fragment output:
$ odoc html-generate test.odocl -o html --as-json --indent
- $ grep type-t html/test/Test/index.html.json
+ $ cat html/test/Test/index.html.json
{"uses_katex":false,"breadcrumbs":[{"name":"test","href":"../index.html","kind":"page"},{"name":"Test","href":"#","kind":"module"}],"toc":[{"title":"Section 1","href":"#section-1","children":[]},{"title":"Section 2","href":"#section-2","children":[]}],"preamble":"
Test
","content":"Section 1
\u000A
\u000A
\u000A
type t\u000A
\u000A
Section 2
\u000A
\u000A
\u000A
type u\u000A
\u000A
"}
$ odoc html-targets test.odocl -o html --as-json --indent
diff --git a/test/generators/html_opts.t/test.mli b/test/integration/html_opts.t/test.mli
similarity index 100%
rename from test/generators/html_opts.t/test.mli
rename to test/integration/html_opts.t/test.mli
diff --git a/test/generators/html_opts.t/test2.mli b/test/integration/html_opts.t/test2.mli
similarity index 100%
rename from test/generators/html_opts.t/test2.mli
rename to test/integration/html_opts.t/test2.mli
diff --git a/test/integration/json_expansion.t/a.ml b/test/integration/json_expansion.t/a.ml
new file mode 100644
index 0000000000..6c5699e6c8
--- /dev/null
+++ b/test/integration/json_expansion.t/a.ml
@@ -0,0 +1 @@
+module B = struct end
diff --git a/test/integration/json_expansion.t/main.ml b/test/integration/json_expansion.t/main.ml
new file mode 100644
index 0000000000..ceccbfa0a1
--- /dev/null
+++ b/test/integration/json_expansion.t/main.ml
@@ -0,0 +1,2 @@
+module A = Main__A
+(** @canonical Main.A *)
diff --git a/test/integration/json_expansion.t/run.t b/test/integration/json_expansion.t/run.t
new file mode 100644
index 0000000000..d693fc0e58
--- /dev/null
+++ b/test/integration/json_expansion.t/run.t
@@ -0,0 +1,27 @@
+Test the JSON output in the presence of expanded modules.
+
+ $ ocamlc -c -o main__A.cmo a.ml -bin-annot -I .
+ $ ocamlc -c main.ml -bin-annot -I .
+ $ odoc compile -I . main__A.cmt
+ $ odoc compile -I . main.cmt
+ $ odoc link -I . main.odoc
+
+ $ odoc html-targets -o html main.odocl
+ html/Main/index.html
+ html/Main/A/index.html
+ html/Main/A/B/index.html
+ $ odoc html-targets --as-json -o html main.odocl
+ html/Main/index.html.json
+ html/Main/A/index.html.json
+ html/Main/A/B/index.html.json
+
+ $ odoc html-generate --as-json -o html main.odocl
+
+ $ cat html/Main/index.html.json
+ {"uses_katex":false,"breadcrumbs":[{"name":"Main","href":"#","kind":"module"}],"toc":[],"preamble":"","content":""}
+
+ $ cat html/Main/A/index.html.json
+ {"uses_katex":false,"breadcrumbs":[{"name":"Main","href":"../index.html","kind":"module"},{"name":"A","href":"#","kind":"module"}],"toc":[],"preamble":"","content":""}
+
+ $ cat html/Main/A/B/index.html.json
+ {"uses_katex":false,"breadcrumbs":[{"name":"Main","href":"../../index.html","kind":"module"},{"name":"A","href":"../index.html","kind":"module"},{"name":"B","href":"#","kind":"module"}],"toc":[],"preamble":"","content":""}