~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_globbing.py

  • Committer: Vincent Ladeuil
  • Date: 2010-09-28 08:57:31 UTC
  • mto: (5490.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5492.
  • Revision ID: v.ladeuil+lp@free.fr-20100928085731-8h0duqj5wf4acsgy
Add -m to search for a regexp in news entries instead of the bug number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
26
26
    )
27
27
from bzrlib.tests import (
28
28
    TestCase,
 
29
    TestCaseInTempDir,
29
30
    )
30
31
 
31
32
 
37
38
                glob = glob_prefix + glob
38
39
            globster = Globster([glob])
39
40
            for name in positive:
40
 
                self.assertTrue(globster.match(name), repr(
 
41
                self.failUnless(globster.match(name), repr(
41
42
                    u'name "%s" does not match glob "%s" (re=%s)' %
42
43
                    (name, glob, globster._regex_patterns[0][0].pattern)))
43
44
            for name in negative:
44
 
                self.assertFalse(globster.match(name), repr(
 
45
                self.failIf(globster.match(name), repr(
45
46
                    u'name "%s" does match glob "%s" (re=%s)' %
46
47
                    (name, glob, globster._regex_patterns[0][0].pattern)))
47
48