aboutsummaryrefslogtreecommitdiffstats
path: root/.extras/test-logic.sh
diff options
context:
space:
mode:
Diffstat (limited to '.extras/test-logic.sh')
-rw-r--r--.extras/test-logic.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/.extras/test-logic.sh b/.extras/test-logic.sh
index a05e990..6d54334 100644
--- a/.extras/test-logic.sh
+++ b/.extras/test-logic.sh
@@ -70,6 +70,20 @@ resolve_target "$T/cat/d"
resolve_target "$T/cat/e"
[[ ${#CYCLES[@]} -ge 1 ]] && ok "cycle caught" || bad "cycle missed"
+# --- installed_in_base ------------------------------------------------------
+# Pre-seed the base pkg set (TB_BASE_LOADED=1 bypasses docker). Names are the
+# bare package name; installed_in_base must match a REQUIRES token against it.
+TB_BASE_LOADED=1
+TB_BASE_PKGS=([python3]=1 [libfoo]=1)
+installed_in_base python3 && ok "base pkg matched" || bad "base pkg not matched"
+installed_in_base notthere && bad "absent pkg wrongly matched" || ok "absent pkg not matched"
+
+# a dep present in the base resolves as met, not UNMET
+mk h "python3"
+resolve_target "$T/cat/h"
+[[ ${#UNMET[@]} -eq 0 ]] && ok "base-provided dep not unmet" || bad "base dep flagged unmet"
+TB_BASE_LOADED=0; TB_BASE_PKGS=()
+
# --- overrides --------------------------------------------------------------
VERSION_ID="current" # reset: left at 15.0 by the version-selection checks above
OV=$(mktemp)