~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_globbing.py

  • Committer: Parth Malwankar
  • Date: 2010-07-19 14:25:37 UTC
  • mto: (5050.3.15 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: parth.malwankar@gmail.com-20100719142537-djnb98492yri3k92
_add_patterns is now done in a specific order in Globster

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
 
314
314
    def test_bad_pattern(self):
315
315
        """Ensure that globster handles bad patterns cleanly."""
316
 
        patterns = [u'RE:[', u'foo', u'RE:*.cpp']
 
316
        patterns = [u'RE:[', u'/home/foo', u'RE:*.cpp']
317
317
        g = Globster(patterns)
318
 
        e = self.assertRaises(errors.InvalidPattern, g.match, 'foo')
 
318
        e = self.assertRaises(errors.InvalidPattern, g.match, 'filename')
319
319
        self.assertContainsRe(e.msg,
320
320
            "File.*ignore.*contains error.*RE:\[.*RE:\*\.cpp", flags=re.DOTALL)
321
321