diff --git a/src/dune/lib_dep.ml b/src/dune/lib_dep.ml index 6d4aa25f0064..10a2741e3ee7 100644 --- a/src/dune/lib_dep.ml +++ b/src/dune/lib_dep.ml @@ -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" diff --git a/test/blackbox-tests/dune.inc b/test/blackbox-tests/dune.inc index da93c46ef79b..a554dc21f701 100644 --- a/test/blackbox-tests/dune.inc +++ b/test/blackbox-tests/dune.inc @@ -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)) @@ -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) @@ -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)