-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into test-ocaml-5.1.1
- Loading branch information
Showing
3 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
test/blackbox-tests/test-cases/pkg/exclusively-extra-sources.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Test for packages with no source field but with extra_sources. | ||
|
||
$ . ./helpers.sh | ||
$ make_lockdir | ||
|
||
$ cat > dune.lock/foo.pkg <<EOF | ||
> (version 1) | ||
> (extra_sources | ||
> (foo.txt | ||
> (fetch | ||
> (url file://$PWD/foo.txt)))) | ||
> EOF | ||
|
||
$ touch foo.txt | ||
|
||
$ cat > dune-project <<EOF | ||
> (lang dune 3.16) | ||
> (package | ||
> (allow_empty) | ||
> (name a) | ||
> (depends foo)) | ||
> EOF | ||
|
||
$ dune build |
35 changes: 35 additions & 0 deletions
35
test/blackbox-tests/test-cases/pkg/extra-source-overlap-with-source.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Test for packages with an extra-source file with the same name as a | ||
file in the package's source. | ||
|
||
$ . ./helpers.sh | ||
$ make_lockdir | ||
|
||
$ cat > dune.lock/foo.pkg <<EOF | ||
> (version 1) | ||
> (source | ||
> (copy $PWD/foo-source)) | ||
> (extra_sources | ||
> (foo.txt | ||
> (fetch | ||
> (url file://$PWD/foo.txt)))) | ||
> EOF | ||
|
||
$ mkdir -p foo-source | ||
$ echo "from source" > foo-source/foo.txt | ||
|
||
$ echo "from extra source" > foo.txt | ||
|
||
$ cat > dune-project <<EOF | ||
> (lang dune 3.16) | ||
> (package | ||
> (allow_empty) | ||
> (name a) | ||
> (depends foo)) | ||
> EOF | ||
|
||
$ dune build | ||
|
||
Make sure that the package's source directory ends up with the version | ||
of foo.txt from extra_sources: | ||
$ cat _build/_private/default/.pkg/foo/source/foo.txt | ||
from extra source |