Skip to content

Commit

Permalink
Test case for bug ocaml#4389
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Yves Strub <[email protected]>
  • Loading branch information
strub authored and ejgallego committed Jan 20, 2022
1 parent 344292c commit 91a389d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
9 changes: 9 additions & 0 deletions otherlibs/site/test/github4389.t/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(executable
(name main)
(public_name main)
(promote (until-clean))
(libraries dune-build-info dune-site))

(generate_sites_module
(module SitesModule)
(sites github4389))
6 changes: 6 additions & 0 deletions otherlibs/site/test/github4389.t/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(lang dune 2.9)
(using dune_site 0.1)

(package
(name github4389)
(sites (share github4389)))
10 changes: 10 additions & 0 deletions otherlibs/site/test/github4389.t/main.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let version =
match Build_info.V1.version () with
| None -> "n/a"
| Some v -> Build_info.V1.Version.to_string v

let () =
Format.eprintf "%s@." version;
List.iter
(fun x -> Format.eprintf "%s@." x)
SitesModule.Sites.github4389
14 changes: 14 additions & 0 deletions otherlibs/site/test/github4389.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$ dune build @install
$ dune install --prefix _install
Installing _install/lib/github4389/META
Installing _install/lib/github4389/dune-package
File "_build/install/default/lib/github4389/dune-package", line 1, characters 0-0:
Warning: Failed to parse file, not adding version and locations information.
Installing _install/bin/main
$ grep sites _install/lib/github4389/dune-package
(sites (github4389 share))
$ grep -o '[^ ]*/_install/share/github4389' _install/lib/github4389/dune-package
[1]
$ _install/bin/main
n/a
$TESTCASE_ROOT/_install/share/github4389/github4389

0 comments on commit 91a389d

Please sign in to comment.