]> arthur.barton.de Git - bup.git/blob - t/test-tz.sh
test-restore-map-owner: accommodate python 3 and test there
[bup.git] / t / test-tz.sh
1 #!/usr/bin/env bash
2 . ./wvtest-bup.sh || exit $?
3
4 set -o pipefail
5
6 top="$(WVPASS pwd)" || exit $?
7 tmpdir="$(WVPASS wvmktempdir)" || exit $?
8
9 export BUP_DIR="$tmpdir/bup"
10 export GIT_DIR="$tmpdir/bup"
11
12 bup() { "$top/bup" "$@"; }
13
14 WVSTART "half hour TZ"
15
16 export TZ=ACDT-10:30
17
18 WVPASS bup init
19 WVPASS cd "$tmpdir"
20
21 WVPASS mkdir src
22 WVPASS bup index src
23 WVPASS bup save -n src -d 1420164180 src
24
25 WVPASSEQ "$(WVPASS git cat-file commit src | sed -ne 's/^author .*> //p')" \
26 "1420164180 +1030"
27
28 WVPASSEQ "$(WVPASS bup ls /src)" \
29 "2015-01-02-123300
30 latest"
31
32 WVPASS rm -rf "$tmpdir"