Skip to content

Commit

Permalink
test: snapshot test after fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Feb 17, 2024
1 parent 4df70f3 commit d5e7514
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions test/blackbox-tests/virtual-lib-compilation.t
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@

$ . ./setup.sh

$ cat > dune-project <<EOF
> (lang dune 3.9)
> (using melange 0.1)
> EOF
$ cat > dune <<EOF
> (melange.emit
> (target output)
> (alias mel)
> (modules x)
> (emit_stdlib false)
> (libraries vlib impl_melange))
> EOF
$ mkdir impl_melange vlib
$ cat > vlib/dune <<EOF
> (library
> (name vlib)
> (wrapped false)
> (modes :standard melange)
> (modes melange)
> (virtual_modules virt))
> EOF
$ cat > vlib/virt.mli <<EOF
> val t : string
> EOF
$ cat > vlib/vlib_impl.ml <<EOF
$ cat > vlib/vlib.ml <<EOF
> let hello = "Hello from " ^ Virt.t
> EOF
Expand All @@ -35,23 +35,27 @@
> (modes melange)
> (implements vlib))
> EOF
$ cat > impl_melange/virt.ml << EOF
> let t = "melange"
> EOF
$ cat > x.ml <<EOF
> let () = print_endline Vlib_impl.hello
> let () = print_endline Vlib.hello
> EOF
$ /Users/anmonteiro/projects/dune/_build/install/default/bin/dune build @melange --display=short
$ dune build @mel --display=short
ocamldep vlib/.vlib.objs/virt.intf.d
ocamldep impl_melange/.impl_melange.objs/virt.impl.d
ocamldep vlib/.vlib.objs/vlib_impl.impl.d
ocamldep vlib/.vlib.objs/vlib.impl.d
melc vlib/.vlib.objs/melange/virt.{cmi,cmti}
melc vlib/.vlib.objs/melange/vlib_impl.{cmi,cmj,cmt} (exit 2)
File "vlib/vlib_impl.ml", line 1:
Error: Virt not found, it means either the module does not exist or it is a namespace
[1]
melc vlib/.vlib.objs/melange/vlib.{cmi,cmj,cmt}
melc impl_melange/.impl_melange.objs/melange/virt.{cmj,cmt}
melc output/vlib/vlib.js
melc .output.mobjs/melange/melange__X.{cmi,cmj,cmt}
melc output/impl_melange/virt.js
melc output/x.js
$ output=_build/default/output/x.js
$ node "$output"
Hello from melange

0 comments on commit d5e7514

Please sign in to comment.