From: Zoran Zaric Date: Mon, 6 Dec 2010 12:00:03 +0000 (+0100) Subject: Adds testcases for --strip and --strip-path. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c42da632e9d46240e6fa3530dd44bf22307cc97b;p=packages%2Fb%2Fbup.git Adds testcases for --strip and --strip-path. Signed-off-by: Zoran Zaric --- diff --git a/t/test.sh b/t/test.sh index 0c83ba7..a38eb56 100755 --- a/t/test.sh +++ b/t/test.sh @@ -303,3 +303,37 @@ WVPASSEQ "$(bup ls exclude-from/latest/$TOP/$D/)" "a b f" rm $EXCLUDE_FILE + +WVSTART "strip" +D=strip.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 --strip -n strip $D +WVPASSEQ "$(bup ls strip/latest/)" "a +b +d/ +f" + +WVSTART "strip-path" +D=strip-path.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 --strip-path $TOP -n strip-path $D +WVPASSEQ "$(bup ls strip-path/latest/$D/)" "a +b +d/ +f"