~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_rules.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:
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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
 
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'),),