aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-07-13 22:13:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-07-14 14:08:15 +0300
commit334ff0a070031eac2e08839aa4c97666941bc653 (patch)
tree8996848096345e77967aa82a1d411205aab2b15a /tests
parente776aaf48a6efab2bce3c421fcad718d34f6d41d (diff)
Invent reused-only dependency alternative selection mode
Diffstat (limited to 'tests')
-rw-r--r--tests/pkg-build.testscript18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 0e6eafe..3533b8d 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -3991,7 +3991,23 @@ test.options += --no-progress
$* box libbox 2>!;
- $* box +{ config.box.extras=true } libbox/0.1.0 2>>~%EOE%;
+ # While at it, test the reused-only alternative selection mode.
+ #
+ $* box +{ config.box.extras=true } libbox/0.1.0 2>>EOE != 0;
+ error: unable to select dependency alternative for package box/1.0.0
+ info: explicitly specify dependency packages to manually select the alternative
+ info: alternative: libbiz
+ info: unsatisfactory alternative: libbox
+ error: unable to satisfy constraints on package libbox
+ info: command line depends on (libbox == 0.1.0)
+ info: box depends on (libbox >= 0.1.1)
+ info: available libbox/0.1.0
+ info: available libbox/1.0.0
+ info: explicitly specify libbox version to manually satisfy both constraints
+ info: while satisfying box/1.0.0
+ EOE
+
+ $* box +{ config.box.extras=true } libbox/0.1.0 ?libbiz 2>>~%EOE%;
build plan:
new libbiz/1.0.0 (required by box)
downgrade libbox/0.1.0