Update shell tests for operand delimiters
This commit is contained in:
4 files changed
+34
-9
No files matched your search
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user