]> arthur.barton.de Git - bup.git/blob - t/test-save-creates-no-unrefs.sh
test-restore-map-owner: accommodate python 3 and test there
[bup.git] / t / test-save-creates-no-unrefs.sh
1 #!/usr/bin/env bash
2 . ./wvtest-bup.sh || exit $?
3
4 WVSTART 'all'
5
6 top="$(WVPASS pwd)" || exit $?
7 tmpdir="$(WVPASS wvmktempdir)" || exit $?
8 export BUP_DIR="$tmpdir/bup"
9 export GIT_DIR="$BUP_DIR"
10
11 bup() { "$top/bup" "$@"; }
12
13 WVPASS mkdir -p "$tmpdir/src"
14 WVPASS touch "$tmpdir/src/foo"
15 WVPASS bup init
16 WVPASS bup index "$tmpdir/src"
17 WVPASS bup save -n src "$tmpdir/src"
18 WVPASSEQ "$(git fsck --unreachable)" ""
19 WVPASS bup save -n src "$tmpdir/src"
20 WVPASSEQ "$(git fsck --unreachable)" ""
21
22 WVPASS rm -rf "$tmpdir"