aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordanix <danix@danix.xyz>2026-06-11 10:16:11 +0200
committerdanix <danix@danix.xyz>2026-06-11 10:16:11 +0200
commit97d910ef1ceb6bb27cb014f6df3ecd688936efe9 (patch)
tree390185549fb1cfc0857041e9a1be88e5cc087211 /tests
parent7e3a0cbfc0c7258870550b916b5f4d8d452e982c (diff)
downloadwallp-97d910ef1ceb6bb27cb014f6df3ecd688936efe9.tar.gz
wallp-97d910ef1ceb6bb27cb014f6df3ecd688936efe9.zip
feat: required-binary preflight check in main
Spec error-handling requirement (swaybg/wal always, qarma when GUI). Caught by final integration review. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/wallp.bats13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/wallp.bats b/tests/wallp.bats
index 0d6fc7e..d7edaec 100644
--- a/tests/wallp.bats
+++ b/tests/wallp.bats
@@ -267,3 +267,16 @@ teardown() {
main --restore --theme tflag
[ "$(cat "$HOME/.config/wallp/theme")" = "tflag" ]
}
+
+@test "missing required binary errors before acting" {
+ unset WAYLAND_DISPLAY
+ rm -f "$STUB_DIR/swaybg" # swaybg now absent
+ PATH="$STUB_DIR" run main --restore
+ [ "$status" -eq 1 ]
+ [[ "$output" == *"swaybg"* ]]
+}
+
+@test "require_bins passes when all present" {
+ run require_bins
+ [ "$status" -eq 0 ]
+}