diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-06-02 20:14:08 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-06-02 20:14:08 +0000 |
commit | 26a6d142dd736feafc347651c22360b5d5574734 (patch) | |
tree | 91403a4228dfc8913328ed16f36f1fed8e2f0813 /rdiff-backup/testing/selectiontest.py | |
parent | 00283590c392d1322a08f84d333c5bec8d51e545 (diff) | |
download | rdiff-backup-26a6d142dd736feafc347651c22360b5d5574734.tar.gz |
Added --null-separator, tweaked increment error handling
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@117 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/selectiontest.py')
-rw-r--r-- | rdiff-backup/testing/selectiontest.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rdiff-backup/testing/selectiontest.py b/rdiff-backup/testing/selectiontest.py index aad2a68..a80830b 100644 --- a/rdiff-backup/testing/selectiontest.py +++ b/rdiff-backup/testing/selectiontest.py @@ -90,11 +90,29 @@ testfiles/select/3/3/2""") assert sf(self.makeext("3/3")) == 1 assert sf(self.makeext("3/3/3")) == None + def testFilelistIncludeNullSep(self): + """Test included filelist but with null_separator set""" + fp = StringIO.StringIO("""\0testfiles/select/1/2\0testfiles/select/1\0testfiles/select/1/2/3\0testfiles/select/3/3/2\0testfiles/select/hello\nthere\0""") + Globals.null_separator = 1 + sf = self.Select.filelist_get_sf(fp, 1, "test") + assert sf(self.root) == 1 + assert sf(self.makeext("1")) == 1 + assert sf(self.makeext("1/1")) == None + assert sf(self.makeext("1/2/3")) == 1 + assert sf(self.makeext("2/2")) == None + assert sf(self.makeext("3")) == 1 + assert sf(self.makeext("3/3")) == 1 + assert sf(self.makeext("3/3/3")) == None + assert sf(self.makeext("hello\nthere")) == 1 + Globals.null_separator = 1 + def testFilelistExclude(self): """Test included filelist""" fp = StringIO.StringIO(""" testfiles/select/1/2 testfiles/select/1 +this is a badly formed line which should be ignored + testfiles/select/1/2/3 testfiles/select/3/3/2""") sf = self.Select.filelist_get_sf(fp, 0, "test") |