]> arthur.barton.de Git - bup.git/blobdiff - t/test-restore-single-file.sh
find_dir_item_metadata_by_name(): wait for the right item name.
[bup.git] / t / test-restore-single-file.sh
index b64a966be78df176340fa68d9ddcbcefa4ff314b..a0c429b653750912960227f718f3632da4b97afc 100755 (executable)
@@ -11,12 +11,15 @@ export BUP_DIR="$tmpdir/bup"
 
 bup() { "$top/bup" "$@"; }
 
-touch "$tmpdir/foo"
+mkdir "$tmpdir/foo"
+mkdir "$tmpdir/foo/bar" # Make sure a dir sorts before baz (regression test).
+touch "$tmpdir/foo/baz"
 WVPASS bup init
 WVPASS bup index "$tmpdir/foo"
 WVPASS bup save -n foo "$tmpdir/foo"
+# Make sure the timestamps will differ if metadata isn't being restored.
 WVPASS bup tick
-WVPASS bup restore -C "$tmpdir/restore" "foo/latest/$tmpdir/foo"
-WVPASS "$top/t/compare-trees" "$tmpdir/foo" "$tmpdir/restore/foo"
+WVPASS bup restore -C "$tmpdir/restore" "foo/latest/$tmpdir/foo/baz"
+WVPASS "$top/t/compare-trees" "$tmpdir/foo/baz" "$tmpdir/restore/baz"
 
 rm -rf "$tmpdir"