]> arthur.barton.de Git - bup.git/commitdiff
Add simple test for "index --exclude-rx-from FILE".
authorRob Browning <rlb@defaultvalue.org>
Fri, 20 Dec 2013 23:26:11 +0000 (17:26 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 21 Dec 2013 01:12:00 +0000 (19:12 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
t/test-save-restore-exclude-rx.sh

index 33d6cb16353a48e971b64267a8b3a54c8d803d8b..d5a4839ae0a4feac178b25810efa9a6b79491bee 100755 (executable)
@@ -101,6 +101,30 @@ WVPASSEQ "$actual" ".
 ./sub/foo"
 
 
+# bup index --exclude-rx-from ...
+# ===============================
+WVSTART "index --exclude-rx-from"
+WVPASS rm -rf src "$BUP_DIR" buprestore.tmp
+WVPASS bup init
+WVPASS mkdir src
+WVPASS touch src/a
+WVPASS touch src/b
+WVPASS mkdir src/sub1
+WVPASS mkdir src/sub2
+WVPASS touch src/sub1/a
+WVPASS touch src/sub2/b
+WVPASS echo "^$(pwd)/src/sub1/" > exclude-rx-file
+WVPASS bup index -u src --exclude-rx-from exclude-rx-file
+WVPASS bup save --strip -n bupdir src
+WVPASS bup restore -C buprestore.tmp /bupdir/latest/
+actual="$(WVPASS cd buprestore.tmp; WVPASS find . | WVPASS sort)" || exit $?
+WVPASSEQ "$actual" ".
+./a
+./b
+./sub2
+./sub2/b"
+
+
 # bup restore --exclude-rx ...
 # ============================
 
@@ -186,4 +210,5 @@ WVPASSEQ "$actual" ".
 ./sub
 ./sub/foo"
 
+
 WVPASS rm -rf "$tmpdir"