]> arthur.barton.de Git - bup.git/commitdiff
Adds testcases for --strip and --strip-path.
authorZoran Zaric <zz@zoranzaric.de>
Mon, 6 Dec 2010 12:00:03 +0000 (13:00 +0100)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 3 Jan 2011 04:52:33 +0000 (20:52 -0800)
Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
t/test.sh

index 0c83ba7882b54911513194023c2379d3e7f43d91..a38eb5609c02a28765a42a2678682cd76f1b727f 100755 (executable)
--- 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"