~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_rules.py

  • Committer: Martin Pool
  • Date: 2009-01-13 03:11:04 UTC
  • mto: This revision was merged to the branch mainline in revision 3937.
  • Revision ID: mbp@sourcefrog.net-20090113031104-03my054s02i9l2pe
Bump version to 1.12 and add news template

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Tests for finding, parsing and searching rule-based preferences."""
18
18
 
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
 
 
78
65
    def test_get_items_pathname_match(self):
79
66
        rs = self.make_searcher("[name ./a.txt]\nfoo=baz\n")
80
67
        self.assertEquals((('foo', 'baz'),),