summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-01-10 04:56:44 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-01-10 04:56:44 +0000
commitfefed35225a9a7c71d6eea22a2481158f62403df (patch)
tree18be8f3246cef48f90f28219848bb22828792d89 /rdiff-backup/testing
parent0e30d52ddd8e78cd1c652357272d387d8aa79533 (diff)
downloadrdiff-backup-fefed35225a9a7c71d6eea22a2481158f62403df.tar.gz
Fix for Toni Price's empty dir --include **XXX selection bug
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@738 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing')
-rw-r--r--rdiff-backup/testing/selectiontest.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/rdiff-backup/testing/selectiontest.py b/rdiff-backup/testing/selectiontest.py
index 3151bf9..569a94f 100644
--- a/rdiff-backup/testing/selectiontest.py
+++ b/rdiff-backup/testing/selectiontest.py
@@ -448,4 +448,27 @@ testfiles/select**/2
# verbose = 1)
+class CommandTest(unittest.TestCase):
+ """Test rdiff-backup on actual directories"""
+ def testEmptyDirInclude(self):
+ """Make sure empty directories are included with **xx exps
+
+ This checks for a bug present in 1.0.3/1.1.5 and similar.
+
+ """
+ outrp = MakeOutputDir()
+ selrp = rpath.RPath(Globals.local_connection, 'testfiles/seltest')
+ re_init_dir(selrp)
+ emptydir = selrp.append('emptydir')
+ emptydir.mkdir()
+
+ rdiff_backup(1, 1, selrp.path, outrp.path,
+ extra_options = ("--include **XX "
+ "--exclude testfiles/seltest/YYYY"))
+
+ outempty = outrp.append('emptydir')
+ assert outempty.isdir(), outempty
+
+
+
if __name__ == "__main__": unittest.main()