~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_rules.py

  • Committer: Ian Clatworthy
  • Date: 2009-01-20 02:12:35 UTC
  • mfrom: (3943.3.4 bzr.multi-glob-rules)
  • mto: This revision was merged to the branch mainline in revision 3947.
  • Revision ID: ian.clatworthy@canonical.com-20090120021235-n8bd5kzz3s624aq5
Multi-glob rules (Marius Kruger)

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        self.assertEquals((('foo', 'bar'),),
63
63
            rs.get_selected_items('a.txt', ['foo']))
64
64
 
 
65
    def test_get_items_from_multiple_glob_match(self):
 
66
        rs = self.make_searcher(
 
67
            "[name *.txt *.py 'x x' \"y y\"]\nfoo=bar\na=True\n")
 
68
        self.assertEquals((), rs.get_items('NEWS'))
 
69
        self.assertEquals((('foo', 'bar'), ('a', 'True')),
 
70
            rs.get_items('a.py'))
 
71
        self.assertEquals((('foo', 'bar'), ('a', 'True')),
 
72
            rs.get_items('a.txt'))
 
73
        self.assertEquals((('foo', 'bar'), ('a', 'True')),
 
74
            rs.get_items('x x'))
 
75
        self.assertEquals((('foo', 'bar'), ('a', 'True')),
 
76
            rs.get_items('y y'))
 
77
 
65
78
    def test_get_items_pathname_match(self):
66
79
        rs = self.make_searcher("[name ./a.txt]\nfoo=baz\n")
67
80
        self.assertEquals((('foo', 'baz'),),