Update shell tests for operand delimiters

This commit is contained in:
LM committed 2026-09-12 20:10:41 +02:00
1 parent b72d7e5768
commit 21cf0db6e9
4 files changed
+34 -9

No files matched your search

+9 -2
View File
@@ -30,7 +30,14 @@ STUB
cat > "$scratch/bin/pacman" <<'STUB'
#!/bin/bash
case "$1" in
-Q) grep -qx "$2" <<< "${INSTALLED:-}" ;;
-Q)
if [[ $2 == "--" ]]; then
shift 2
else
shift
fi
grep -qx -- "$1" <<< "${INSTALLED:-}"
;;
-S)
printf 'pacman %s\n' "$*" >> "$CALL_LOG"
exit "${INSTALL_STATUS:-0}"
@@ -62,7 +69,7 @@ run_setup() {
}
assert_installs() {
grep -qx 'pacman -S --needed --noconfirm --ask 4 libfprint-git fprintd usbutils' "$CALL_LOG" || fail "$1"
grep -qx 'pacman -S --needed --noconfirm --ask 4 -- libfprint-git fprintd usbutils' "$CALL_LOG" || fail "$1"
(( $(grep -c '^pacman ' "$CALL_LOG") == 1 )) || fail "$1: one pacman transaction"
}