File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
test/blackbox-tests/test-cases/select-field Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ We test the `(select)` field of the `(libraries)` field in the presence of
2+ `(include_subdirs unqualified)`
3+
4+ $ cat > dune-project << EOF
5+ > (lang dune 3.22 )
6+ > EOF
7+
8+ $ cat > dune << EOF
9+ > (include_subdirs unqualified)
10+ > (library
11+ > (name foo)
12+ > (libraries
13+ > (select bar. ml from
14+ > (unix -> bar. unix. ml)
15+ > (! unix -> bar. nounix. ml))))
16+ > EOF
17+
18+ $ mkdir -p sub
19+ $ cat > sub/ bar. unix. ml << EOF
20+ > let () = print_endline " Test: Unix was found!"
21+ > EOF
22+ $ cat > sub/ bar. nounix. ml << EOF
23+ > let () = print_endline " Test: Unix was not found!"
24+ > EOF
25+
26+ The select field does not pick up the module sources for the test stanza
27+ correctly. This is a bug.
28+
29+ $ dune build foo. cma
30+ File " _unknown_" , line 1 , characters 0 -0:
31+ Error: No rule found for bar .unix .ml
32+ [1 ]
33+
34+ $ cat > dune <<EOF
35+ > (include_subdirs unqualified)
36+ > (library
37+ > (name foo)
38+ > (libraries
39+ > (select bar. ml from
40+ > (unix -> sub/ bar. unix. ml)
41+ > (! unix -> sub/ bar. nounix. ml))))
42+ > EOF
43+
44+ It also doesn't allow specifying the path
45+
46+ $ dune build foo .cma
47+ File "dune ", line 6 , characters 12-27 :
48+ 6 | (unix -> sub/ bar. unix. ml)
49+ ^^^^^^^^^^^^^^^
50+ Error : The format for files in this select branch must be bar .{name}. ml
51+ [1 ]
You can’t perform that action at this time.
0 commit comments