Files
Daniele Fucini bd8ded486d Add bats test suite
Black-box tests that run the script with stub commands on a minimal PATH and temp config/state folders.
2026-11-09 19:51:42 +01:00

9 lines
272 B
Bash
Executable File

#!/bin/bash
# "aur repo -u -d <repo>": prints $STUB_DATA/aur, exits $AUR_RC (default 0).
printf '%s %s\n' "${0##*/}" "$*" >> "$STUB_DATA/calls"
[[ ${1:-} == repo ]] || exit 1
if [[ -s $STUB_DATA/aur ]]; then
printf '%s\n' "$(<"$STUB_DATA/aur")"
fi
exit "${AUR_RC:-0}"