]> arthur.barton.de Git - bup.git/blob - t/test-save-creates-no-unrefs.sh
save-cmd.py: don't write an irrelevant and incomplete .bupm fragment.
[bup.git] / t / test-save-creates-no-unrefs.sh
1 #!/usr/bin/env bash
2 . ./wvtest-bup.sh
3
4 set -eo pipefail
5
6 WVSTART 'all'
7
8 top="$(pwd)"
9 tmpdir="$(wvmktempdir)"
10 export BUP_DIR="$tmpdir/bup"
11 export GIT_DIR="$BUP_DIR"
12
13 bup() { "$top/bup" "$@"; }
14
15 mkdir -p "$tmpdir/src"
16 touch "$tmpdir/src/foo"
17 bup init
18 bup index "$tmpdir/src"
19 bup save -n src "$tmpdir/src"
20 WVPASSEQ "$(git fsck --unreachable)" ""
21 bup save -n src "$tmpdir/src"
22 WVPASSEQ "$(git fsck --unreachable)" ""
23
24 rm -rf "$tmpdir"