2 . ./wvtest-bup.sh || exit $?
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" "$@"; }
14 compare-trees() { "$top/t/compare-trees" "$@"; }
18 # Make sure that we can explicitly save a path whose parent is up to
21 WVSTART "save path with up to date parent"
24 WVPASS mkdir -p src/a src/b
25 WVPASS touch src/a/1 src/b/2
26 WVPASS bup index -u src
27 WVPASS bup save -n src src
29 WVPASS bup save -n src src/b
30 WVPASS bup restore -C restore "src/latest/$(pwd)/"
31 WVPASS test ! -e restore/src/a
32 WVPASS "$top/t/compare-trees" -c src/b/ restore/src/b/
34 WVPASS bup save -n src src/a/1
36 WVPASS bup restore -C restore "src/latest/$(pwd)/"
37 WVPASS test ! -e restore/src/b
38 WVPASS "$top/t/compare-trees" -c src/a/ restore/src/a/
40 WVPASS rm -rf "$tmpdir"