]> arthur.barton.de Git - bup.git/blobdiff - t/test-restore-single-file.sh
Include metadata when asked to restore individual non-directory paths.
[bup.git] / t / test-restore-single-file.sh
diff --git a/t/test-restore-single-file.sh b/t/test-restore-single-file.sh
new file mode 100755 (executable)
index 0000000..b64a966
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+. ./wvtest-bup.sh
+
+set -e -o pipefail
+
+WVSTART 'all'
+
+top="$(pwd)"
+tmpdir="$(wvmktempdir)"
+export BUP_DIR="$tmpdir/bup"
+
+bup() { "$top/bup" "$@"; }
+
+touch "$tmpdir/foo"
+WVPASS bup init
+WVPASS bup index "$tmpdir/foo"
+WVPASS bup save -n foo "$tmpdir/foo"
+WVPASS bup tick
+WVPASS bup restore -C "$tmpdir/restore" "foo/latest/$tmpdir/foo"
+WVPASS "$top/t/compare-trees" "$tmpdir/foo" "$tmpdir/restore/foo"
+
+rm -rf "$tmpdir"