-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(stdlib): merge wrapped/unwrapped tests
Signed-off-by: Rudi Grinberg <[email protected]>
- Loading branch information
Showing
3 changed files
with
45 additions
and
89 deletions.
There are no files selected for viewing
50 changes: 0 additions & 50 deletions
50
test/blackbox-tests/test-cases/stdlib/stdlib-compilation-unwrapped.t
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
test/blackbox-tests/test-cases/stdlib/stdlib-compilation-wrapped.t
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
test/blackbox-tests/test-cases/stdlib/stdlib-compilation-wrapping.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Compile a library with `(stdlib ..)` and wrapped settings | ||
|
||
$ cat > dune-project <<EOF | ||
> (lang dune 3.7) | ||
> (using experimental_building_ocaml_compiler_with_dune 0.1) | ||
> EOF | ||
|
||
$ mkdir stdlib | ||
$ runtest() { | ||
> cat >stdlib/dune <<EOF | ||
> (library | ||
> (name mystdlib) | ||
> (wrapped $1) | ||
> (stdlib | ||
> (internal_modules Camlinternal*))) | ||
> EOF | ||
> dune build | ||
> find _build/default/stdlib -iname '*.cmi' | sort; | ||
> } | ||
|
||
$ cat > stdlib/other.ml <<EOF | ||
> let other () = Mystdlib.defined_in_stdlib | ||
> EOF | ||
$ cat > stdlib/one_module.ml <<EOF | ||
> let foo = "foo" | ||
> EOF | ||
$ cat > stdlib/mystdlib.ml <<EOF | ||
> let defined_in_stdlib = "defined" | ||
> module One_module = One_module | ||
> module Other = Other | ||
> EOF | ||
|
||
First we test wrapped: | ||
|
||
$ runtest "true" | ||
_build/default/stdlib/.mystdlib.objs/byte/mystdlib.cmi | ||
_build/default/stdlib/.mystdlib.objs/byte/mystdlib__One_module.cmi | ||
_build/default/stdlib/.mystdlib.objs/byte/mystdlib__Other.cmi | ||
|
||
And now unwrapped: | ||
|
||
$ runtest "false" | ||
_build/default/stdlib/.mystdlib.objs/byte/mystdlib.cmi | ||
_build/default/stdlib/.mystdlib.objs/byte/one_module.cmi | ||
_build/default/stdlib/.mystdlib.objs/byte/other.cmi |