9 tmpdir="$(wvmktempdir)"
10 export BUP_DIR="$tmpdir/bup"
12 bup() { "$top/bup" "$@"; }
15 mkdir "$tmpdir/foo/bar" # Make sure a dir sorts before baz (regression test).
16 touch "$tmpdir/foo/baz"
18 WVPASS bup index "$tmpdir/foo"
19 WVPASS bup save -n foo "$tmpdir/foo"
20 # Make sure the timestamps will differ if metadata isn't being restored.
22 WVPASS bup restore -C "$tmpdir/restore" "foo/latest/$tmpdir/foo/baz"
23 WVPASS "$top/t/compare-trees" "$tmpdir/foo/baz" "$tmpdir/restore/baz"