feat: implement notification color swatch and dependency verification
This commit is contained in:
@@ -206,6 +206,32 @@ it "rejects invalid formats"
|
||||
output=$("$COLOR_TOOL" "#000000" --output badfmt --no-copy --no-notify 2>&1 || true)
|
||||
assert_contains "$output" "Error: Invalid output format: badfmt"
|
||||
|
||||
# 14. Installation Dependency Warnings
|
||||
it "warns about missing dependencies during install"
|
||||
mkdir -p "$TEST_DIR/install_bin"
|
||||
for cmd in bash cat echo printf mkdir mktemp chmod rm cp ln dirname readlink ps; do
|
||||
if [[ -e "/usr/bin/$cmd" || -L "/usr/bin/$cmd" ]]; then
|
||||
/usr/bin/ln -s "/usr/bin/$cmd" "$TEST_DIR/install_bin/$cmd"
|
||||
elif [[ -e "/bin/$cmd" || -L "/bin/$cmd" ]]; then
|
||||
/usr/bin/ln -s "/bin/$cmd" "$TEST_DIR/install_bin/$cmd"
|
||||
fi
|
||||
done
|
||||
output=$(PATH="$TEST_DIR/install_bin" HOME="$TEST_DIR" WAYLAND_DISPLAY="" XDG_CURRENT_DESKTOP="" KDE_FULL_SESSION="" "$COLOR_TOOL" --install 2>&1 || true)
|
||||
|
||||
if [[ "$output" == *"python3 — required"* ]] &&
|
||||
[[ "$output" == *"jq — required"* ]] &&
|
||||
[[ "$output" == *"curl — required"* ]] &&
|
||||
[[ "$output" == *"libnotify (notify-send)"* ]] &&
|
||||
[[ "$output" == *"KDE Plasma on Wayland"* ]] &&
|
||||
[[ "$output" == *"ImageMagick"* ]] &&
|
||||
[[ "$output" == *"wl-clipboard"* ]]; then
|
||||
echo "PASS"
|
||||
passed=$((passed + 1))
|
||||
else
|
||||
echo "FAIL"
|
||||
echo " Actual output: $output"
|
||||
fi
|
||||
|
||||
# ── Cleanup ───────────────────────────────────────────────────────────────────
|
||||
echo "---------------------------------------"
|
||||
echo "Result: $passed/$total tests passed."
|
||||
|
||||
Reference in New Issue
Block a user