7 top="$(WVPASS pwd)" || exit $?
8 tmpdir="$(WVPASS wvmktempdir)" || exit $?
10 export BUP_DIR="$tmpdir/bup"
11 export GIT_DIR="$tmpdir/bup"
13 bup() { "$top/bup" "$@"; }
19 WVPASS force-delete "$BUP_DIR"
22 WVPASS bup index "$top/Documentation"
23 WVPASS bup save -n compression -0 --strip "$top/Documentation"
24 # Some platforms set -A by default when root, so just use it everywhere.
25 expected="$(WVPASS ls -A "$top/Documentation" | WVPASS sort)" || exit $?
26 actual="$(WVPASS bup ls -A compression/latest/ | WVPASS sort)" || exit $?
27 WVPASSEQ "$actual" "$expected"
28 compression_0_size=$(WVPASS du -k -s "$BUP_DIR" | WVPASS cut -f1) || exit $?
31 WVPASS force-delete "$BUP_DIR"
34 WVPASS bup index "$top/Documentation"
35 WVPASS bup save -n compression -9 --strip "$top/Documentation"
36 expected="$(ls -A "$top/Documentation" | sort)" || exit $?
37 actual="$(bup ls -A compression/latest/ | sort)" || exit $?
38 WVPASSEQ "$actual" "$expected"
39 compression_9_size=$(WVPASS du -k -s "$BUP_DIR" | WVPASS cut -f1) || exit $?
41 WVPASS [ "$compression_9_size" -lt "$compression_0_size" ]
44 WVPASS rm -rf "$tmpdir"