Skip to content

Commit

Permalink
Add test select validation tests
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Nov 7, 2019
1 parent 8af8a21 commit 39ed2a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dune/lib_dep.ml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module Select = struct
"The prefix for files in this select branch must be %S"
prefix
];
if not (String.is_suffix result_fn ~suffix) then
if not (String.is_suffix file ~suffix) then
User_error.raise ~loc:loc_file
[ Pp.textf
"The suffix for files in this select branch must be %S"
Expand Down
10 changes: 10 additions & 0 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,14 @@
test-cases/select
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(rule
(alias select-2-0-rules)
(deps (package dune) (source_tree test-cases/select-2-0-rules))
(action
(chdir
test-cases/select-2-0-rules
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(rule
(alias several-packages)
(deps (package dune) (source_tree test-cases/several-packages))
Expand Down Expand Up @@ -2100,6 +2108,7 @@
(alias scope-bug)
(alias scope-ppx-bug)
(alias select)
(alias select-2-0-rules)
(alias several-packages)
(alias shadow-bindings)
(alias stale-artifact-removal)
Expand Down Expand Up @@ -2305,6 +2314,7 @@
(alias sandboxing)
(alias scope-bug)
(alias select)
(alias select-2-0-rules)
(alias several-packages)
(alias shadow-bindings)
(alias stale-artifact-removal)
Expand Down

0 comments on commit 39ed2a0

Please sign in to comment.