diff options
author | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-02-17 16:45:35 +1000 |
---|---|---|
committer | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-02-17 16:45:35 +1000 |
commit | 0afbc6ac4bbadc98c7031440279581dc332c9dd3 (patch) | |
tree | 90cab040e07f5964a3f372710f66358f8c58a7a9 /tests/test_filter_processor.py | |
parent | d555bbf276a5a490ca5f19d37cba9253fe6cdbb5 (diff) | |
download | bzr-fastimport-0afbc6ac4bbadc98c7031440279581dc332c9dd3.tar.gz |
include subdir & multiple files tests
Diffstat (limited to 'tests/test_filter_processor.py')
-rw-r--r-- | tests/test_filter_processor.py | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/tests/test_filter_processor.py b/tests/test_filter_processor.py index 0d0576e..fd7db59 100644 --- a/tests/test_filter_processor.py +++ b/tests/test_filter_processor.py @@ -197,3 +197,70 @@ ing from :100 M 644 :3 README.txt """) + + def test_subdir(self): + params = {'include_paths': ['doc/']} + self.assertFiltering(_SAMPLE_WITH_DIR, params, \ +"""blob +mark :1 +data 9 +Welcome! +commit refs/heads/master +mark :100 +committer a <b@c> 1234798653 +0000 +data 4 +test +M 644 :1 README.txt +blob +mark :3 +data 19 +Welcome! +my friend +blob +mark :4 +data 11 +== Docs == +commit refs/heads/master +mark :102 +committer d <b@c> 1234798653 +0000 +data 8 +test +ing +from :100 +M 644 :3 README.txt +M 644 :4 index.txt +""") + + def test_multiple_files_in_subdir(self): + # The new root should be the subdrectory + params = {'include_paths': ['doc/README.txt', 'doc/index.txt']} + self.assertFiltering(_SAMPLE_WITH_DIR, params, \ +"""blob +mark :1 +data 9 +Welcome! +commit refs/heads/master +mark :100 +committer a <b@c> 1234798653 +0000 +data 4 +test +M 644 :1 README.txt +blob +mark :3 +data 19 +Welcome! +my friend +blob +mark :4 +data 11 +== Docs == +commit refs/heads/master +mark :102 +committer d <b@c> 1234798653 +0000 +data 8 +test +ing +from :100 +M 644 :3 README.txt +M 644 :4 index.txt +""") |