Skip to content

Commit

Permalink
Merge pull request #522 from rgrinberg/duplicate-mlds
Browse files Browse the repository at this point in the history
Test to reproduce bug with duplicate mld's in same package
  • Loading branch information
rgrinberg committed Feb 17, 2018
2 parents 5669f57 + 2b73678 commit e6d3e9f
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/blackbox-tests/jbuild
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,13 @@
(progn
(run ${exe:cram.exe} run.t)
(diff? run.t run.t.corrected))))))))

(alias
((name runtest)
(deps ((files_recursively_in test-cases/odoc-unique-mlds)))
(action
(chdir test-cases/odoc-unique-mlds
(setenv JBUILDER ${bin:jbuilder}
(progn
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
(diff? run.t run.t.corrected)))))))
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(jbuild_version 1)

(library
((name scope1)
(public_name scope1)))
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(jbuild_version 1)

(library
((name scope2)
(public_name scope2)))
Empty file.
35 changes: 35 additions & 0 deletions test/blackbox-tests/test-cases/odoc-unique-mlds/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Duplicate mld's in the same scope
$ $JBUILDER build @doc -j1 --display short --root ./same-scope 2>&1 | grep -v Entering
odoc _doc/odoc.css
odoc _doc/root.lib1/page-index.odoc
odoc _doc/root.lib1/page-test.odoc
ocamlc lib1/.root_lib1.objs/root_lib1.{cmi,cmo,cmt}
odoc _doc/root.lib2/page-index.odoc
odoc _doc/root.lib2/page-test.odoc
ocamlc lib2/.root_lib2.objs/root_lib2.{cmi,cmo,cmt}
odoc _doc/root.lib1/root_lib1.odoc
odoc _doc/root.lib2/root_lib2.odoc
odoc _doc/root.lib1/index.html
odoc _doc/root.lib1/test.html
odoc _doc/root.lib1/Root_lib1/.jbuilder-keep,_doc/root.lib1/Root_lib1/index.html
odoc _doc/root.lib2/index.html
odoc _doc/root.lib2/test.html
odoc _doc/root.lib2/Root_lib2/.jbuilder-keep,_doc/root.lib2/Root_lib2/index.html
Duplicate mld's in different scope
$ $JBUILDER build @doc -j1 --display short --root ./diff-scope 2>&1 | grep -v Entering
odoc _doc/odoc.css
odoc _doc/scope1/page-foo.odoc
odoc _doc/scope1/page-index.odoc
ocamlc scope1/.scope1.objs/scope1.{cmi,cmo,cmt}
odoc _doc/scope2/page-foo.odoc
odoc _doc/scope2/page-index.odoc
ocamlc scope2/.scope2.objs/scope2.{cmi,cmo,cmt}
odoc _doc/scope1/scope1.odoc
odoc _doc/scope2/scope2.odoc
odoc _doc/scope1/foo.html
odoc _doc/scope1/index.html
odoc _doc/scope1/Scope1/.jbuilder-keep,_doc/scope1/Scope1/index.html
odoc _doc/scope2/foo.html
odoc _doc/scope2/index.html
odoc _doc/scope2/Scope2/.jbuilder-keep,_doc/scope2/Scope2/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(jbuild_version 1)

(library
((name root_lib1)
(public_name root.lib1)))
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(jbuild_version 1)

(library
((name root_lib2)
(public_name root.lib2)))
Empty file.
Empty file.

0 comments on commit e6d3e9f

Please sign in to comment.