Skip to content

Commit 672275c

Browse files
committed
Fix missing name field tests
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent c8039e0 commit 672275c

File tree

7 files changed

+8
-14
lines changed

7 files changed

+8
-14
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(dune lang 1.0)
1+
(lang dune 1.0)

test/blackbox-tests/test-cases/no-name-field/no-name-exes-syntax-1-0/foo.opam

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(executables (public_names (bar baz))
1+
(executables (public_names bar baz))

test/blackbox-tests/test-cases/no-name-field/no-name-exes/foo.opam

Whitespace-only changes.

test/blackbox-tests/test-cases/no-name-field/no-name-lib-syntax-1-0/foo.opam

Whitespace-only changes.

test/blackbox-tests/test-cases/no-name-field/no-name-lib/foo.opam

Whitespace-only changes.
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
the name field can be omitted for libraries when public_name is present
22
$ dune build --root no-name-lib
3-
File "dune", line 1, characters 9-26:
4-
Error: You cannot declare items to be installed without adding a <package>.opam file at the root of your project.
5-
To declare elements to be installed as part of package "foo", add a "foo.opam" file at the root of your project.
6-
[1]
3+
Entering directory 'no-name-lib'
74

85
this isn't possible for older syntax <= (1, 0)
96
$ dune build --root no-name-lib-syntax-1-0
10-
File "dune", line 1, characters 9-26:
11-
Error: You cannot declare items to be installed without adding a <package>.opam file at the root of your project.
12-
To declare elements to be installed as part of package "foo", add a "foo.opam" file at the root of your project.
7+
File "dune", line 1, characters 0-27:
8+
Error: name field cannot be omitted before version 1.1
139
[1]
1410

1511
executable(s) stanza works the same way
1612

1713
$ dune build --root no-name-exes
18-
File "exes/dune", line 1, characters 37-37:
19-
Error: unclosed parenthesis at end of input
20-
[1]
14+
Entering directory 'no-name-exes'
2115

2216
$ dune build --root no-name-exes-syntax-1-0
23-
File "dune-project", line 1, characters 0-15:
24-
Error: Invalid first line, expected: (lang <lang> <version>)
17+
File "dune", line 1, characters 0-36:
18+
Error: name field may not be omitted before dune version 1.1
2519
[1]

0 commit comments

Comments
 (0)