X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=t%2Ftest.sh;h=f9a633a3500582849ce6736a404bdd9105fe6fcc;hb=0ee1a48734ab97227255f29b77362028103ff49d;hp=a38eb5609c02a28765a42a2678682cd76f1b727f;hpb=c42da632e9d46240e6fa3530dd44bf22307cc97b;p=bup.git diff --git a/t/test.sh b/t/test.sh index a38eb56..f9a633a 100755 --- a/t/test.sh +++ b/t/test.sh @@ -208,9 +208,9 @@ WVPASSEQ "$(sha1sum <$D/a)" "$(sha1sum <$D/a.new)" WVSTART "tag" WVFAIL bup tag -d v0.n 2>/dev/null WVFAIL bup tag v0.n non-existant 2>/dev/null -WVPASSEQ "$(bup tag 2>&1)" "" +WVPASSEQ "$(bup tag)" "" WVPASS bup tag v0.1 master -WVPASSEQ "$(bup tag 2>&1)" "v0.1" +WVPASSEQ "$(bup tag)" "v0.1" WVPASS bup tag -d v0.1 # This section destroys data in the bup repository, so it is done last. @@ -337,3 +337,40 @@ WVPASSEQ "$(bup ls strip-path/latest/$D/)" "a b d/ f" + +WVSTART "indexfile" +D=indexfile.tmp +INDEXFILE=tmpindexfile.tmp +rm -f $INDEXFILE +rm -rf $D +mkdir $D +export BUP_DIR="$D/.bup" +WVPASS bup init +touch $D/a +touch $D/b +mkdir $D/c +WVPASS bup index -ux $D +bup save --strip -n bupdir $D +WVPASSEQ "$(bup ls bupdir/latest/)" "a +b +c/" +WVPASS bup index -f $INDEXFILE --exclude=$D/c -ux $D +bup save --strip -n indexfile -f $INDEXFILE $D +WVPASSEQ "$(bup ls indexfile/latest/)" "a +b" + + +WVSTART "import-rsnapshot" +D=rsnapshot.tmp +export BUP_DIR="$TOP/$D/.bup" +rm -rf $D +mkdir $D +WVPASS bup init +mkdir -p $D/hourly.0/buptest/a +touch $D/hourly.0/buptest/a/b +mkdir -p $D/hourly.0/buptest/c/d +touch $D/hourly.0/buptest/c/d/e +WVPASS true +WVPASS bup import-rsnapshot $D/ +WVPASSEQ "$(bup ls buptest/latest/)" "a/ +c/"