~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_ignore.py

  • Committer: Aaron Bentley
  • Date: 2010-05-10 11:34:20 UTC
  • mfrom: (5218 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5221.
  • Revision ID: aaron@aaronbentley.com-20100510113420-toh2d5yioobb5uq1
Merged bzr.dev into transform-commit-full.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
        """'ignore' with no arguments returns an error"""
107
107
        self.make_branch_and_tree('.')
108
108
        self.run_bzr_error(('bzr: ERROR: ignore requires at least one '
109
 
                            'NAME_PATTERN or --old-default-rules\n',),
 
109
                            'NAME_PATTERN or --default-rules.\n',),
110
110
                           'ignore')
111
111
 
112
 
    def test_ignore_old_defaults(self):
113
 
        out, err = self.run_bzr('ignore --old-default-rules')
114
 
        self.assertContainsRe(out, 'CVS')
 
112
    def test_ignore_default_rules(self):
 
113
        out, err = self.run_bzr(['ignore', '--default-rules'])
 
114
        reference_set = set(ignores.USER_DEFAULTS)
 
115
        output_set = set(out.rstrip().split('\n'))
 
116
        self.assertEqual(reference_set, output_set)
115
117
        self.assertEqual('', err)
116
118
 
117
119
    def test_ignore_versioned_file(self):
154
156
                         " and match your ignore pattern:\nb\n"\
155
157
                         "These files will continue to be version controlled"\
156
158
                         " unless you 'bzr remove' them.\n")
 
159
 
 
160
    def test_ignore_directory(self):
 
161
        """Test --directory option"""
 
162
        tree = self.make_branch_and_tree('a')
 
163
        self.run_bzr(['ignore', '--directory=a', 'README'])
 
164
        self.check_file_contents('a/.bzrignore', 'README\n')