Skip to content

Commit

Permalink
Update emit-private.t
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro authored Apr 12, 2024
1 parent 28068aa commit 9878514
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/blackbox-tests/test-cases/melange/emit-private.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Test dependency on a private library in the same package as melange.emit

$ cat >dune-project <<EOF
> (lang dune 3.8)
> (package (name a))
> (package (name pkg))
> (using melange 0.1)
> EOF

Expand All @@ -12,7 +12,7 @@ Test dependency on a private library in the same package as melange.emit
> (library
> (name a)
> (modes melange)
> (package a))
> (package pkg))
> EOF

$ cat > a/foo.ml <<EOF
Expand All @@ -22,33 +22,33 @@ Test dependency on a private library in the same package as melange.emit
$ dune build

$ dune install --prefix $PWD/prefix --display short
Installing $TESTCASE_ROOT/prefix/lib/a/META
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/a.ml
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/foo.ml
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/melange/.public_cmi_melange/a.cmi
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/melange/.public_cmi_melange/a.cmt
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/melange/.public_cmi_melange/a__Foo.cmi
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/melange/.public_cmi_melange/a__Foo.cmt
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/melange/a.cmj
Installing $TESTCASE_ROOT/prefix/lib/a/__private__/a/melange/a__Foo.cmj
Installing $TESTCASE_ROOT/prefix/lib/a/dune-package
Installing $TESTCASE_ROOT/prefix/lib/pkg/META
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/a.ml
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/foo.ml
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/melange/.public_cmi_melange/a.cmi
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/melange/.public_cmi_melange/a.cmt
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/melange/.public_cmi_melange/a__Foo.cmi
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/melange/.public_cmi_melange/a__Foo.cmt
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/melange/a.cmj
Installing $TESTCASE_ROOT/prefix/lib/pkg/__private__/a/melange/a__Foo.cmj
Installing $TESTCASE_ROOT/prefix/lib/pkg/dune-package

$ cat > b/dune <<EOF
> (melange.emit
> (target dist)
> (alias dist)
> (libraries a)
> (emit_stdlib false)
> (package a))
> (package pkg))
> EOF

$ cat > b/bar.ml <<EOF
> let x = Js.log A.Foo.x
> EOF

$ OCAMLPATH=$PWD/prefix/lib/:$OCAMLPATH dune build @dist --display=short 2>&1 | grep -v melange
melc b/dist/node_modules/a.__private__.a/a.js
melc b/dist/node_modules/a.__private__.a/foo.js
melc b/dist/node_modules/pkg.__private__.a/a.js
melc b/dist/node_modules/pkg.__private__.a/foo.js
melc b/dist/b/bar.js

$ node _build/default/b/dist/b/bar.js
Expand Down

0 comments on commit 9878514

Please sign in to comment.