-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(pkg): reproduce depext crash (#10939)
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
test/blackbox-tests/test-cases/pkg/depexts/unknown-variable.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,25 @@ | ||
Solving with an unknown variable on depexts: | ||
|
||
$ . ../helpers.sh | ||
$ mkrepo | ||
$ add_mock_repo_if_needed | ||
|
||
The "foobar" variable is not defined: | ||
$ mkpkg foo <<EOF | ||
> depexts: [[ "unzip" ] {foobar}] | ||
> EOF | ||
|
||
Make a project that uses the foo library: | ||
$ cat > dune-project <<EOF | ||
> (lang dune 3.13) | ||
> (package | ||
> (name bar) | ||
> (depends foo)) | ||
> EOF | ||
|
||
Locking should succeed and not include the "unzip" package | ||
$ dune pkg lock 2>&1 | head -n 1 | ||
Error: exception Failure("Undefined boolean filter value: foobar") | ||
|
||
$ [ -e dune.lock/foo.pkg ] && cat dune.lock/foo.pkg | ||
[1] |