/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2007-09-05 04:46:24 UTC
  • mfrom: (2795 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2798.
  • Revision ID: mbp@sourcefrog.net-20070905044624-vaf6cxrjbvu6nh7t
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
        self.assertContainsRe(out, 'CVS')
118
118
        self.assertEqual('', err)
119
119
 
 
120
    def test_ignore_versioned_file(self):
 
121
        tree = self.make_branch_and_tree('.')
 
122
        self.build_tree(['a','b'])
 
123
        tree.add('a')
 
124
 
 
125
        # test a single versioned file
 
126
        out, err = self.run_bzr('ignore a')
 
127
        self.assertEqual(out, 
 
128
                         "Warning: the following files are version controlled"\
 
129
                         " and match your ignore pattern:\na\n")
 
130
 
 
131
        # test a single unversioned file
 
132
        out, err = self.run_bzr('ignore b')
 
133
        self.assertEqual(out, '')
 
134
 
 
135
        # test wildcards
 
136
        tree.add('b')
 
137
        out, err = self.run_bzr('ignore *')
 
138
        self.assertEqual(out, 
 
139
                         "Warning: the following files are version controlled"\
 
140
                         " and match your ignore pattern:\n.bzrignore\na\nb\n")
 
141
 
 
142
    def test_ignored_versioned_file_matching_new_pattern(self):
 
143
        tree = self.make_branch_and_tree('.')
 
144
        self.build_tree(['a', 'b'])
 
145
        tree.add(['a', 'b'])
 
146
        self.run_bzr('ignore *')
 
147
 
 
148
        # If only the given pattern is used then only 'b' should match in
 
149
        # this case.
 
150
        out, err = self.run_bzr('ignore b')
 
151
        self.assertEqual(out, 
 
152
                         "Warning: the following files are version controlled"\
 
153
                         " and match your ignore pattern:\nb\n")