682
682
'- testfiles/select/1\n'
685
def test_include_globbing_filelist_asterisk(self):
686
"""Filelist glob test with * instead of 'testfiles'"""
687
# Thank you to Elifarley Cruz for this test case
688
# (https://bugs.launchpad.net/duplicity/+bug/884371).
689
self.ParseTest([("--include-globbing-filelist", "file")],
690
[(), ('1',), ('1', '1'), ('1', '1', '1'),
691
('1', '1', '2'), ('1', '1', '3')],
695
def test_include_globbing_filelist_asterisk_2(self):
696
"""Identical to test_globbing_filelist, but with the exclude 'select' replaced with '*'"""
697
self.ParseTest([("--include-globbing-filelist", "file")],
698
[(), ('1',), ('1', '1'), ('1', '1', '2'),
700
["- testfiles/*/1/1/1\n"
701
"testfiles/select/1/1\n"
702
"- testfiles/select/1\n"
705
@unittest.expectedFailure
706
def test_include_globbing_filelist_asterisk_3(self):
707
"""Identical to test_globbing_filelist, but with the auto-include 'select' replaced with '*'"""
708
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
709
self.ParseTest([("--include-globbing-filelist", "file")],
710
[(), ('1',), ('1', '1'), ('1', '1', '2'),
712
["- testfiles/select/1/1/1\n"
714
"- testfiles/select/1\n"
717
@unittest.expectedFailure
718
def test_include_globbing_filelist_asterisk_4(self):
719
"""Identical to test_globbing_filelist, but with a specific include 'select' replaced with '*'"""
720
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
721
self.ParseTest([("--include-globbing-filelist", "file")],
722
[(), ('1',), ('1', '1'), ('1', '1', '2'),
724
["- testfiles/select/1/1/1\n"
725
"+ testfiles/*/1/1\n"
726
"- testfiles/select/1\n"
729
@unittest.expectedFailure
730
def test_include_globbing_filelist_asterisk_5(self):
731
"""Identical to test_globbing_filelist, but with all 'select's replaced with '*'"""
732
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
733
self.ParseTest([("--include-globbing-filelist", "file")],
734
[(), ('1',), ('1', '1'), ('1', '1', '2'),
736
["- testfiles/*/1/1/1\n"
737
"+ testfiles/*/1/1\n"
741
def test_include_globbing_filelist_asterisk_6(self):
742
"""Identical to test_globbing_filelist, but with numerous excluded folders replaced with '*'"""
743
self.ParseTest([("--include-globbing-filelist", "file")],
744
[(), ('1',), ('1', '1'), ('1', '1', '2'),
747
"+ testfiles/select/1/1\n"
751
@unittest.expectedFailure
752
def test_include_globbing_filelist_asterisk_7(self):
753
"""Identical to test_globbing_filelist, but with numerous included/excluded folders replaced with '*'"""
754
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
755
self.ParseTest([("--include-globbing-filelist", "file")],
756
[(), ('1',), ('1', '1'), ('1', '1', '2'),
764
def test_include_globbing_filelist_double_asterisk_1(self):
765
"""Identical to test_globbing_filelist, but with the exclude 'select' replaced with '**'"""
766
self.ParseTest([("--include-globbing-filelist", "file")],
767
[(), ('1',), ('1', '1'), ('1', '1', '2'),
769
["- testfiles/**/1/1/1\n"
770
"testfiles/select/1/1\n"
771
"- testfiles/select/1\n"
774
@unittest.expectedFailure
775
def test_include_globbing_filelist_double_asterisk_2(self):
776
"""Identical to test_globbing_filelist, but with the include 'select' replaced with '**'"""
777
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
778
self.ParseTest([("--include-globbing-filelist", "file")],
779
[(), ('1',), ('1', '1'), ('1', '1', '2'),
781
["- testfiles/select/1/1/1\n"
783
"- testfiles/select/1\n"
786
def test_include_globbing_filelist_double_asterisk_3(self):
787
"""Identical to test_globbing_filelist, but with the exclude 'testfiles/select' replaced with '**'"""
788
self.ParseTest([("--include-globbing-filelist", "file")],
789
[(), ('1',), ('1', '1'), ('1', '1', '2'),
792
"testfiles/select/1/1\n"
793
"- testfiles/select/1\n"
796
@unittest.expectedFailure
797
def test_include_globbing_filelist_double_asterisk_4(self):
798
"""Identical to test_globbing_filelist, but with the include 'testfiles/select' replaced with '**'"""
799
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
800
self.ParseTest([("--include-globbing-filelist", "file")],
801
[(), ('1',), ('1', '1'), ('1', '1', '2'),
803
["- testfiles/select/1/1/1\n"
805
"- testfiles/select/1\n"
808
@unittest.expectedFailure
809
def test_include_globbing_filelist_double_asterisk_5(self):
810
"""Identical to test_globbing_filelist, but with all 'testfiles/select's replaced with '**'"""
811
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
812
self.ParseTest([("--include-globbing-filelist", "file")],
813
[(), ('1',), ('1', '1'), ('1', '1', '2'),
820
def test_include_globbing_filelist_trailing_slashes(self):
821
"""Filelist glob test similar to globbing filelist, but with trailing slashes"""
822
self.ParseTest([("--include-globbing-filelist", "file")],
823
[(), ('1',), ('1', '1'), ('1', '1', '2'),
825
["- testfiles/select/1/1/1/\n"
826
"testfiles/select/1/1/\n"
827
"- testfiles/select/1/\n"
830
@unittest.expectedFailure
831
def test_include_globbing_filelist_trailing_slashes_and_single_asterisks(self):
832
"""Filelist glob test similar to globbing filelist, but with trailing slashes and single asterisks"""
833
# Todo: Bug #932482 (https://bugs.launchpad.net/duplicity/+bug/932482)
834
self.ParseTest([("--include-globbing-filelist", "file")],
835
[(), ('1',), ('1', '1'), ('1', '1', '2'),
837
["- */select/1/1/1/\n"
838
"testfiles/select/1/1/\n"
842
@unittest.expectedFailure
843
def test_include_globbing_filelist_trailing_slashes_and_double_asterisks(self):
844
"""Filelist glob test similar to globbing filelist, but with trailing slashes and double asterisks"""
845
# Todo: Bug #932482 (https://bugs.launchpad.net/duplicity/+bug/932482)
846
self.ParseTest([("--include-globbing-filelist", "file")],
847
[(), ('1',), ('1', '1'), ('1', '1', '2'),
850
"testfiles/select/1/1/\n"
854
def test_exclude_globbing_filelist(self):
855
"""Exclude version of test_globbing_filelist"""
856
self.ParseTest([("--exclude-globbing-filelist", "file")],
857
[(), ('1',), ('1', '1'), ('1', '1', '2'),
859
["testfiles/select/1/1/1\n"
860
"+ testfiles/select/1/1\n"
861
"testfiles/select/1\n"
864
def test_exclude_globbing_filelist_asterisk_1(self):
865
"""Exclude version of test_include_globbing_filelist_asterisk"""
866
self.ParseTest([("--exclude-globbing-filelist", "file")],
867
[(), ('1',), ('1', '1'), ('1', '1', '1'),
868
('1', '1', '2'), ('1', '1', '3')],
872
def test_exclude_globbing_filelist_asterisk_2(self):
873
"""Identical to test_exclude_globbing_filelist, but with the exclude 'select' replaced with '*'"""
874
self.ParseTest([("--exclude-globbing-filelist", "file")],
875
[(), ('1',), ('1', '1'), ('1', '1', '2'),
877
["testfiles/*/1/1/1\n"
878
"+ testfiles/select/1/1\n"
879
"testfiles/select/1\n"
882
@unittest.expectedFailure
883
def test_exclude_globbing_filelist_asterisk_3(self):
884
"""Identical to test_exclude_globbing_filelist, but with the include 'select' replaced with '*'"""
885
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
886
self.ParseTest([("--exclude-globbing-filelist", "file")],
887
[(), ('1',), ('1', '1'), ('1', '1', '2'),
889
["testfiles/select/1/1/1\n"
890
"+ testfiles/*/1/1\n"
891
"testfiles/select/1\n"
894
def test_exclude_globbing_filelist_asterisk_4(self):
895
"""Identical to test_exclude_globbing_filelist, but with numerous excluded folders replaced with '*'"""
896
self.ParseTest([("--exclude-globbing-filelist", "file")],
897
[(), ('1',), ('1', '1'), ('1', '1', '2'),
900
"+ testfiles/select/1/1\n"
904
@unittest.expectedFailure
905
def test_exclude_globbing_filelist_asterisk_5(self):
906
"""Identical to test_exclude_globbing_filelist, but with numerous included/excluded folders replaced with '*'"""
907
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
908
self.ParseTest([("--exclude-globbing-filelist", "file")],
909
[(), ('1',), ('1', '1'), ('1', '1', '2'),
916
@unittest.expectedFailure
917
def test_exclude_globbing_filelist_double_asterisk(self):
918
"""Identical to test_exclude_globbing_filelist, but with all included/excluded folders replaced with '**'"""
919
# Todo: Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371)
920
self.ParseTest([("--exclude-globbing-filelist", "file")],
921
[(), ('1',), ('1', '1'), ('1', '1', '2'),
685
928
def testGlob(self):
686
929
"""Test globbing expression"""
687
930
self.ParseTest([("--exclude", "**[3-5]"),