Skip to content

Commit

Permalink
Fix existing select tests
Browse files Browse the repository at this point in the history
Use the new naming convention for selected modules

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Nov 7, 2019
1 parent 5d9156d commit a8bfe60
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions test/blackbox-tests/test-cases/select/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
> (name main)
> (libraries
> (select bar.ml from
> (unix -> bar_unix.ml)
> (!unix -> bar_no_unix.ml))
> (unix -> bar.unix.ml)
> (!unix -> bar.no_unix.ml))
> (select foo.ml from
> (fakefoobar -> foo_fake.ml)
> (!fakefoobar -> foo_no_fake.ml))))
> (fakefoobar -> foo.fake.ml)
> (!fakefoobar -> foo.no_fake.ml))))
> (alias
> (name runtest)
> (action (run ./main.exe)))
Expand All @@ -35,19 +35,26 @@
> (name main)
> (libraries
> (select bar.ml from
> (unix -> bar_unix.ml)
> (!unix -> bar_no_unix.ml))
> (unix -> bar.unix.ml)
> (!unix -> bar.no_unix.ml))
> (select foo.ml from
> (fakefoobar -> foo_fake.ml)
> (!fakefoobar -> foo_no_fake.ml))))
> (fakefoobar -> foo.fake.ml)
> (!fakefoobar -> foo.no_fake.ml))))
> (rule
> (alias runtest)
> (action (run ./main.exe)))
> EOF

$ dune runtest --display short
File "dune", line 5, characters 12-23:
5 | (unix -> bar_unix.ml)
^^^^^^^^^^^
Error: The prefix for files in this select branch must be "bar."
[1]
ocamlc .main.eobjs/byte/dune__exe.{cmi,cmo,cmt}
ocamlc .main.eobjs/byte/dune__exe__Bar.{cmi,cmo,cmt}
ocamlopt .main.eobjs/native/dune__exe__Bar.{cmx,o}
ocamlc .main.eobjs/byte/dune__exe__Foo.{cmi,cmo,cmt}
ocamlc .main.eobjs/byte/dune__exe__Main.{cmi,cmo,cmt}
ocamlopt .main.eobjs/native/dune__exe__Main.{cmx,o}
ocamlopt .main.eobjs/native/dune__exe.{cmx,o}
ocamlopt .main.eobjs/native/dune__exe__Foo.{cmx,o}
ocamlopt main.exe
main alias runtest
bar has unix
foo has no fake

0 comments on commit a8bfe60

Please sign in to comment.