~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_globbing.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-04-08 06:17:41 UTC
  • mfrom: (4797.33.16 apport)
  • Revision ID: pqm@pqm.ubuntu.com-20100408061741-m7vl6z97vu33riv7
(robertc) Make sure ExecutablePath and InterpreterPath are set in
        Apport. (Martin Pool, James Westby, lp:528114)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
 
from bzrlib import errors
19
18
from bzrlib.globbing import (
20
19
    Globster,
21
20
    ExceptionGlobster,
309
308
            self.assertEqual(patterns[x],globster.match(filename))
310
309
        self.assertEqual(None,globster.match('foobar.300'))
311
310
 
312
 
    def test_bad_pattern(self):
313
 
        """Ensure that globster handles bad patterns cleanly."""
314
 
        patterns = [u'RE:[']
315
 
        g = Globster(patterns)
316
 
        e = self.assertRaises(errors.InvalidPattern, g.match, 'foo')
317
 
        self.assertContainsRe(e.msg, "File.*ignore.*contains errors")
318
 
 
319
 
 
320
311
class TestExceptionGlobster(TestCase):
321
312
 
322
313
    def test_exclusion_patterns(self):