#!/usr/bin/env bash
-. ./wvtest-bup.sh
+. ./wvtest-bup.sh || exit $?
set -o pipefail
top="$(WVPASS pwd)" || exit $?
tmpdir="$(WVPASS wvmktempdir)" || exit $?
+bup() { "$top/bup" "$@"; }
+
+WVPASS "$top/t/sync-tree" "$top/t/sampledata/" "$tmpdir/src/"
+
export BUP_DIR="$tmpdir/bup"
export GIT_DIR="$tmpdir/bup"
-bup() { "$top/bup" "$@"; }
-
WVPASS bup init
WVPASS cd "$tmpdir"
WVSTART "fsck"
-WVPASS bup index "$top"
-WVPASS bup save -n fsck-test "$top/lib"
-WVPASS bup save -n fsck-test "$top/Documentation"
-WVPASS bup save -n fsck-test "$top/cmd"
+WVPASS bup index src
+WVPASS bup save -n fsck-test src/b2
+WVPASS bup save -n fsck-test src/var/cmd
+WVPASS bup save -n fsck-test src/var/doc
+WVPASS bup save -n fsck-test src/var/lib
+WVPASS bup save -n fsck-test src/y
WVPASS bup fsck
WVPASS bup fsck --quick
if bup fsck --par2-ok; then