-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: filtering depends/depopts with {version} (#11021)
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
test/blackbox-tests/test-cases/pkg/opam-var/opam-var-dep-filtering.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,57 @@ | ||
Demonstrate how dependencies are filtered in opam files: | ||
|
||
$ . ../helpers.sh | ||
|
||
$ build_single_package() { | ||
> solve_project <<EOF | ||
> (lang dune 3.11) | ||
> (package | ||
> (name x) | ||
> (depends | ||
> $1)) | ||
> EOF | ||
> build_pkg $1 | ||
> } | ||
|
||
$ mkrepo | ||
|
||
$ mkpkg "foo" | ||
|
||
Regular dependencies | ||
|
||
$ mkpkg "testpkg" 1 <<'EOF' | ||
> depends: [ "foo" {version = 1} ] | ||
> EOF | ||
|
||
$ solve testpkg | ||
Solution for dune.lock: | ||
- foo.0.0.1 | ||
- testpkg.1 | ||
|
||
$ mkpkg "testpkg" 2 <<'EOF' | ||
> depends: [ "foo" {version = 1} ] | ||
> EOF | ||
|
||
$ solve testpkg | ||
Solution for dune.lock: | ||
- testpkg.2 | ||
|
||
Depopts. We don't have proper support for depopts yet, so these don't work. | ||
When depopts are enabled though, the test should demonstrate that depopts works | ||
the same way as depends | ||
|
||
$ mkpkg "testpkg" 1 <<'EOF' | ||
> depopts: [ "foo" {version = 1} ] | ||
> EOF | ||
|
||
$ solve testpkg | ||
Solution for dune.lock: | ||
- testpkg.2 | ||
|
||
$ mkpkg "testpkg" 2 <<'EOF' | ||
> depopts: [ "foo" {version = 1} ] | ||
> EOF | ||
|
||
$ solve testpkg | ||
Solution for dune.lock: | ||
- testpkg.2 |