Skip to content

Commit

Permalink
Add test case for duplicate c_names/cxx_names
Browse files Browse the repository at this point in the history
The current error message should be improved

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed Jan 29, 2019
1 parent 01b46a3 commit 6720d98
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
10 changes: 10 additions & 0 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@
test-cases/dup-fields
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name duplicate-c-cxx)
(deps (package dune) (source_tree test-cases/duplicate-c-cxx))
(action
(chdir
test-cases/duplicate-c-cxx
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name duplicate-target-no-loc)
(deps (package dune) (source_tree test-cases/duplicate-target-no-loc))
Expand Down Expand Up @@ -1261,6 +1269,7 @@
(alias dune-ppx-driver-system)
(alias dune-project-edition)
(alias dup-fields)
(alias duplicate-c-cxx)
(alias duplicate-target-no-loc)
(alias embed-jbuild)
(alias enabled_if)
Expand Down Expand Up @@ -1414,6 +1423,7 @@
(alias dune-ppx-driver-system)
(alias dune-project-edition)
(alias dup-fields)
(alias duplicate-c-cxx)
(alias duplicate-target-no-loc)
(alias embed-jbuild)
(alias enabled_if)
Expand Down
4 changes: 4 additions & 0 deletions test/blackbox-tests/test-cases/duplicate-c-cxx/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(library
(name foo)
(c_names foo)
(cxx_names foo))
9 changes: 9 additions & 0 deletions test/blackbox-tests/test-cases/duplicate-c-cxx/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
c_names and cxx_names with overlapping names
$ dune build @all
Info: creating file dune-project with this contents:
| (lang dune 1.7)

Multiple rules generated for _build/default/foo$ext_obj:
- dune:3
- dune:4
[1]
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/menhir/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Reproduction case for #1781, only the .ml and .mli should be promoted:
$ dune build @all --root promote
Entering directory 'promote'
$ ls -1 promote/_build/default | grep mock
parser__mock.mli.inferred
parser__mock.ml.mock
parser__mock.mli.inferred
$ ls -1 promote | grep mock
[1]
Check what is being generated exactly:
Expand Down

0 comments on commit 6720d98

Please sign in to comment.