1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/usr/bin/env bash
. ./wvtest-bup.sh
set -o pipefail
top="$(WVPASS pwd)" || exit $?
tmpdir="$(WVPASS wvmktempdir)" || exit $?
export BUP_DIR="$tmpdir/bup"
export GIT_DIR="$tmpdir/bup"
bup() { "$top/bup" "$@"; }
# FIXME: send help to stdout if requested (exit 0), stderr on error
# (exit nonzero)
bup -?
rc=$?
WVPASSEQ 99 "$rc"
bup --help
rc=$?
WVPASSEQ 99 "$rc"
if ! test -e Documentation/bup-save.1; then
WVPASS rm -rf "$tmpdir"
exit 0
fi
mkdir -p "$tmpdir/man"
(cd "$tmpdir/man" && ln -s "$top/Documentation" man1)
export MANPATH="$tmpdir/man"
PAGER=cat WVPASS bup help save
PAGER=cat WVPASS bup save --help
WVPASSEQ 1 $(bup help save | grep -cE 'bup.save . create a new bup backup set')
WVPASSEQ 1 $(bup save --help | grep -cE 'bup.save . create a new bup backup set')
WVPASS rm -rf "$tmpdir"
|