~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin
  • Date: 2010-05-16 15:18:43 UTC
  • mfrom: (5235 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5239.
  • Revision ID: gzlist@googlemail.com-20100516151843-lu53u7caehm3ie3i
Merge bzr.dev to resolve conflicts in NEWS and _chk_map_pyx

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')