Skip to content

Commit

Permalink
Add a test that covers the error
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Pluvinage <lucas.pluvinage@gmail.com>
  • Loading branch information
TheLortex committed Apr 1, 2019
1 parent 7cf377a commit ecefa1e
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/blackbox-tests/test-cases/variants/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ variants results in an appropriate error message.
^^^^^^^
Error: Multiple solutions for the implementation
of vlib with variants [ "default" ]
-> lib2_default ("default")
-> lib_default ("default")
-> lib2_default ("default")
-> required by executable bar in dune:2
[1]

Expand Down Expand Up @@ -78,3 +78,7 @@ Solving variant ambiguity by specifying a concrete implementation.
Entering directory 'variant-with-concrete-impl'
bar alias default
hello from lib2.default

Don't fail when the same library is defined in multiple scopes.
$ dune build --root same-lib-in-multiple-scopes
Entering directory 'same-lib-in-multiple-scopes'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(executable
(name exe)
(variants unix)
(libraries test))

(alias
(name default)
(action
(run ./exe.exe)))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 1.9)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 1.9)
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(library
(name test_unix)
(public_name test-unix)
(implements test)
(variant unix))
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(library
(name test)
(public_name test)
(virtual_modules foo))
Empty file.

0 comments on commit ecefa1e

Please sign in to comment.