117
117
self.assertContainsRe(out, 'CVS')
118
118
self.assertEqual('', err)
120
def test_ignore_versioned_file(self):
121
tree = self.make_branch_and_tree('.')
122
self.build_tree(['a','b'])
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")
131
# test a single unversioned file
132
out, err = self.run_bzr('ignore b')
133
self.assertEqual(out, '')
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")
142
def test_ignored_versioned_file_matching_new_pattern(self):
143
tree = self.make_branch_and_tree('.')
144
self.build_tree(['a', 'b'])
146
self.run_bzr('ignore *')
148
# If only the given pattern is used then only 'b' should match in
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")