summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing/selectiontest.py
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-01-10 06:15:42 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-01-10 06:15:42 +0000
commitc38eef4fb3ddc1e0f2808bf118a5f7dc6fa1a0a0 (patch)
treeb7cd7338a95b97e90b3859e35eb2bc7a14859bde /rdiff-backup/testing/selectiontest.py
parentca1b97bbb42668e10a96a57fbe7c96df934ac84f (diff)
downloadrdiff-backup-c38eef4fb3ddc1e0f2808bf118a5f7dc6fa1a0a0.tar.gz
Fix for Toni Price's empty dir --include **XXX selection bug
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r1-0@739 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/selectiontest.py')
-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()