~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_win32utils.py

  • Committer: Kuno Meyer
  • Date: 2007-07-22 21:58:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2655.
  • Revision ID: kuno.meyer@gmx.ch-20070722215816-c6lrm9ayg2emrtb0
Fix for non-ASCII filenames

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
            [['a', 'a'], ['a', 'a']]])
60
60
        
61
61
    def test_tree1(self):
 
62
        """Checks the glob expansion and path separation char
 
63
        normalization"""
62
64
        self.build_tree(['a', 'a1', 'a2', 'a11', 'a.1',
63
65
                         'b', 'b1', 'b2', 'b3',
64
66
                         'c/', 'c/c1', 'c/c2', 
72
74
            [['d'], ['d']],
73
75
            [['d/'], ['d/']],
74
76
            [['d\\'], ['d/']],
75
 
               
 
77
            
76
78
            # wildcards
77
79
            [['a*'], ['a', 'a1', 'a2', 'a11', 'a.1']],
78
80
            [['?'], ['a', 'b', 'c', 'd']],
88
90
            [['*/'], ['c/', 'd/']],
89
91
            [['*\\'], ['c/', 'd/']]])
90
92
        
 
93
    def test_tree2(self):
 
94
        """Checks behaviour with non-ascii filenames"""
 
95
        self.build_tree([u'�', u'�', u'�/', u'�/��'])
 
96
        self._run_testset([
 
97
            # no wildcards
 
98
            [[u'�'], [u'�']],
 
99
            [[u'�'], [u'�']],
 
100
            
 
101
            [[u'�/'], [u'�/']],
 
102
            [[u'�/��'], [u'�/��']],
 
103
            
 
104
            # wildcards
 
105
            [[u'?'], [u'�', u'�', u'�']],
 
106
            [[u'*'], [u'�', u'�', u'�']],
 
107
            
 
108
            [[u'*/'], [u'�/']],
 
109
            [[u'*/*'], [u'�/��']]])
 
110
 
91
111
    def _run_testset(self, testset):
92
112
        for pattern, expected in testset:
93
113
            result = glob_expand(pattern)