Skip to content

Commit 6720d98

Browse files
committed
Add test case for duplicate c_names/cxx_names
The current error message should be improved Signed-off-by: Rudi Grinberg <[email protected]>
1 parent 01b46a3 commit 6720d98

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

test/blackbox-tests/dune.inc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@
207207
test-cases/dup-fields
208208
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
209209

210+
(alias
211+
(name duplicate-c-cxx)
212+
(deps (package dune) (source_tree test-cases/duplicate-c-cxx))
213+
(action
214+
(chdir
215+
test-cases/duplicate-c-cxx
216+
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
217+
210218
(alias
211219
(name duplicate-target-no-loc)
212220
(deps (package dune) (source_tree test-cases/duplicate-target-no-loc))
@@ -1261,6 +1269,7 @@
12611269
(alias dune-ppx-driver-system)
12621270
(alias dune-project-edition)
12631271
(alias dup-fields)
1272+
(alias duplicate-c-cxx)
12641273
(alias duplicate-target-no-loc)
12651274
(alias embed-jbuild)
12661275
(alias enabled_if)
@@ -1414,6 +1423,7 @@
14141423
(alias dune-ppx-driver-system)
14151424
(alias dune-project-edition)
14161425
(alias dup-fields)
1426+
(alias duplicate-c-cxx)
14171427
(alias duplicate-target-no-loc)
14181428
(alias embed-jbuild)
14191429
(alias enabled_if)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(library
2+
(name foo)
3+
(c_names foo)
4+
(cxx_names foo))
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
c_names and cxx_names with overlapping names
2+
$ dune build @all
3+
Info: creating file dune-project with this contents:
4+
| (lang dune 1.7)
5+
6+
Multiple rules generated for _build/default/foo$ext_obj:
7+
- dune:3
8+
- dune:4
9+
[1]

test/blackbox-tests/test-cases/menhir/run.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ Reproduction case for #1781, only the .ml and .mli should be promoted:
7575
$ dune build @all --root promote
7676
Entering directory 'promote'
7777
$ ls -1 promote/_build/default | grep mock
78-
parser__mock.mli.inferred
7978
parser__mock.ml.mock
79+
parser__mock.mli.inferred
8080
$ ls -1 promote | grep mock
8181
[1]
8282
Check what is being generated exactly:

0 commit comments

Comments
 (0)