X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=blobdiff_plain;f=t%2Ftest.sh;h=e736bf81768531681760e332c0b5f9c0f0f5f543;hp=e40ada1d788edc765888f0247fc09290285666ca;hb=b4b4ef116880;hpb=7f45493d9b35ea16cb7514e2a39ece16354e4449 diff --git a/t/test.sh b/t/test.sh index e40ada1..e736bf8 100755 --- a/t/test.sh +++ b/t/test.sh @@ -16,8 +16,53 @@ WVSTART "init" rm -rf "$BUP_DIR" WVPASS bup init -WVSTART "split" +WVSTART "index" +D=bupdata.tmp +rm -rf $D +mkdir $D +WVPASSEQ "$(bup index -p)" "" +WVPASSEQ "$(bup index -p $D)" "" +WVFAIL [ -e $D.fake ] +WVFAIL bup index -u $D.fake +WVPASS bup index -u $D +WVPASSEQ "$(bup index -p $D)" "$D/" +touch $D/a $D/b +mkdir $D/d $D/d/e +WVPASSEQ "$(bup index -s $D/)" "A $D/" +WVPASSEQ "$(bup index -s $D/b)" "" +bup tick +WVPASSEQ "$(bup index -us $D/b)" "A $D/b" +WVPASSEQ "$(bup index -us $D)" \ +"A $D/d/e/ +A $D/d/ +A $D/b +A $D/a +A $D/" +WVPASSEQ "$(bup index -us $D/b $D/a --fake-valid)" \ +" $D/b + $D/a" +WVPASSEQ "$(bup index -us $D/a)" " $D/a" # stays unmodified +touch $D/a +WVPASS bup index -u $D/a # becomes modified +WVPASSEQ "$(bup index -s $D)" \ +"A $D/d/e/ +A $D/d/ + $D/b +M $D/a +A $D/" +WVPASSEQ "$(cd $D && bup index -m .)" \ +"./d/e/ +./d/ +./a +./" +WVPASSEQ "$(cd $D && bup index -m)" \ +"d/e/ +d/ +a +." + +WVSTART "split" WVPASS bup split --bench -b tags1.tmp WVPASS bup split -vvvv -b testfile2 >tags2.tmp WVPASS bup split -t testfile2 >tags2t.tmp