]> arthur.barton.de Git - bup.git/blobdiff - t/test.sh
Adds --graft option to bup save.
[bup.git] / t / test.sh
index f9a633a3500582849ce6736a404bdd9105fe6fcc..4920308c805287e1288dafeb3a83888c4ef75443 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -338,6 +338,28 @@ b
 d/
 f"
 
+WVSTART "graft_points"
+D=graft-points.tmp
+rm -rf $D
+mkdir $D
+export BUP_DIR="$D/.bup"
+WVPASS bup init
+touch $D/a
+WVPASS bup random 128k >$D/b
+mkdir $D/d $D/d/e
+WVPASS bup random 512 >$D/f
+WVPASS bup index -ux $D
+bup save --graft $TOP/$D=/grafted -n graft-point-absolute $D
+WVPASSEQ "$(bup ls graft-point-absolute/latest/grafted/)" "a
+b
+d/
+f"
+bup save --graft $D=grafted -n graft-point-relative $D
+WVPASSEQ "$(bup ls graft-point-relative/latest/$TOP/grafted/)" "a
+b
+d/
+f"
+
 WVSTART "indexfile"
 D=indexfile.tmp
 INDEXFILE=tmpindexfile.tmp