aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-12-25 18:26:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-01-17 18:45:14 +0300
commit97527ad5720cd64e1168e88f7d74e21975bfda8d (patch)
treec4e04bfb90576a61b6f7182daa10a8328b020ba7 /tests
parent56e0a851185136dbdd6f1eaa75f44da774a61e51 (diff)
Add initial support for dependency alternative reflect clause
Diffstat (limited to 'tests')
-rw-r--r--tests/common/dependency-alternatives/t8a/fox-1.0.0.tar.gzbin0 -> 452 bytes
-rw-r--r--tests/pkg-build.testscript1
-rw-r--r--tests/pkg-configure.testscript24
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/common/dependency-alternatives/t8a/fox-1.0.0.tar.gz b/tests/common/dependency-alternatives/t8a/fox-1.0.0.tar.gz
new file mode 100644
index 0000000..baf1068
--- /dev/null
+++ b/tests/common/dependency-alternatives/t8a/fox-1.0.0.tar.gz
Binary files differ
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 213290d..a67eca3 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -138,6 +138,7 @@
# |
# |-- t8a
# | |-- foo-1.0.0.tar.gz -> {libbar libbaz} ^1.0.0
+# | |-- fox-1.0.0.tar.gz -> libbar ^1.0.0 | libbaz ^1.0.0
# | |-- libbar-1.0.0.tar.gz
# | |-- libbaz-1.0.0.tar.gz
# | `-- repositories.manifest
diff --git a/tests/pkg-configure.testscript b/tests/pkg-configure.testscript
index eff0a2e..1c049b6 100644
--- a/tests/pkg-configure.testscript
+++ b/tests/pkg-configure.testscript
@@ -451,4 +451,28 @@ if ($posix && "$uid" != '0')
$pkg_disfigure libbar 2>!;
$pkg_purge libbar 2>!
}
+
+ : reflect
+ :
+ {
+ $clone_cfg;
+
+ $pkg_fetch fox/1.0.0 && $pkg_unpack fox;
+ $pkg_fetch libbaz/1.0.0 && $pkg_unpack libbaz;
+
+ $* libbaz 2>!;
+
+ $* fox 2>'configured fox/1.0.0';
+
+ cat cfg/fox-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.fox.backend = libbaz
+ %.*
+ EOO
+
+ $pkg_disfigure fox 2>!;
+ $pkg_purge fox 2>!;
+ $pkg_disfigure libbaz 2>!;
+ $pkg_purge libbaz 2>!
+ }
}