1
# Copyright (C) 2005, 2006 Canonical Ltd
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
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
20
from bzrlib.tests.blackbox.test_unversion import TestUnversion
21
from bzrlib.workingtree import WorkingTree
24
class TestRemove(TestUnversion):
26
def __init__(self, methodName='runTest'):
27
super(TestRemove, self).__init__(methodName)
31
def assertCommandPerformedOnFiles(self,files):
34
self.assertNotInWorkingTree(f)
36
def test_command_on_unversioned_files(self):
37
self.build_tree(['a'])
38
tree = self.make_branch_and_tree('.')
40
(out,err) = self.runbzr(self.cmd + ' a')
41
self.assertEquals(out.strip(), "")
42
self.assertEquals(err.strip(), "deleted a")
44
def test_command_on_non_existing_files(self):
45
tree = self._make_add_and_assert_tree([])
46
(out,err) = self.runbzr(self.cmd + ' b')
47
self.assertEquals(out.strip(), "")
48
self.assertEquals(err.strip(), "b does not exist.")