~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_globbing.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    _OrderedGlobster,
21
21
    )
22
22
from bzrlib.tests import (
23
 
    TestCase, 
 
23
    TestCase,
24
24
    TestCaseInTempDir,
25
25
    )
26
26
 
171
171
             [u'foo/x', u'foo/bax', u'foo/a.x', u'foo/.x', u'foo/.q.x'],
172
172
             [u'foo/bar/bax']),
173
173
            (u'*/*x',
174
 
             [u'\u8336/x', u'foo/x', u'foo/bax', u'x/a.x', u'.foo/x', 
 
174
             [u'\u8336/x', u'foo/x', u'foo/bax', u'x/a.x', u'.foo/x',
175
175
              u'\u8336/.x', u'foo/.q.x'],
176
176
             [u'foo/bar/bax']),
177
177
            (u'f*',
178
178
             [u'foo', u'foo.bar'],
179
179
             [u'.foo', u'foo/bar', u'foo/.bar']),
180
180
            (u'*bar',
181
 
             [u'bar', u'foobar', ur'foo\nbar', u'foo.bar', u'foo/bar', 
 
181
             [u'bar', u'foobar', ur'foo\nbar', u'foo.bar', u'foo/bar',
182
182
              u'foo/foobar', u'foo/f.bar', u'.bar', u'foo/.bar'],
183
183
             []),
184
184
            ])
191
191
             [u'foox', u'foo/bax', u'foo/.x', u'foo/bar/bax']),
192
192
            (u'**/bar',
193
193
             [u'bar', u'foo/bar'],
194
 
             [u'foobar', u'foo.bar', u'foo/foobar', u'foo/f.bar', 
 
194
             [u'foobar', u'foo.bar', u'foo/foobar', u'foo/f.bar',
195
195
              u'.bar', u'foo/.bar']),
196
196
            # check that we ignore extra *s, so *** is treated like ** not *.
197
197
            (u'foo/***/x',
199
199
             [u'foox', u'foo/bax', u'foo/.x', u'foo/bar/bax']),
200
200
            (u'***/bar',
201
201
             [u'bar', u'foo/bar'],
202
 
             [u'foobar', u'foo.bar', u'foo/foobar', u'foo/f.bar', 
 
202
             [u'foobar', u'foo.bar', u'foo/foobar', u'foo/f.bar',
203
203
              u'.bar', u'foo/.bar']),
204
204
            # the remaining tests check that ** is interpreted as *
205
205
            # unless it is a whole path component
216
216
             [u'foo', u'foo.bar'],
217
217
             [u'.foo', u'foo/bar', u'foo/.bar']),
218
218
            (u'**bar',
219
 
             [u'bar', u'foobar', ur'foo\nbar', u'foo.bar', u'foo/bar', 
 
219
             [u'bar', u'foobar', ur'foo\nbar', u'foo.bar', u'foo/bar',
220
220
              u'foo/foobar', u'foo/f.bar', u'.bar', u'foo/.bar'],
221
221
             []),
222
222
            ])
257
257
    def test_leading_asterisk_dot(self):
258
258
        self.assertMatch([
259
259
            (u'*.x',
260
 
             [u'foo/bar/baz.x', u'\u8336/Q.x', u'foo.y.x', u'.foo.x', 
 
260
             [u'foo/bar/baz.x', u'\u8336/Q.x', u'foo.y.x', u'.foo.x',
261
261
              u'bar/.foo.x', u'.x',],
262
262
             [u'foo.x.y']),
263
263
            (u'foo/*.bar',
293
293
    def test_large_globset(self):
294
294
        """tests that the globster can handle a large set of patterns.
295
295
 
296
 
        Large is defined as more than supported by python regex groups, 
 
296
        Large is defined as more than supported by python regex groups,
297
297
        i.e. 99.
298
298
        This test assumes the globs are broken into regexs containing 99
299
299
        groups.