From 97d910ef1ceb6bb27cb014f6df3ecd688936efe9 Mon Sep 17 00:00:00 2001 From: danix Date: Thu, 11 Jun 2026 10:16:11 +0200 Subject: 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 --- tests/wallp.bats | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') 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 ] +} -- cgit v1.2.3