[PATCH] test case for removing deleted contents

Wouter van Heyst larstiq at larstiq.dyndns.org
Sat Oct 29 17:10:59 BST 2005


While we're on the subject of the bugtracker, I've attached a testcase
for https://launchpad.net/products/bzr/+bug/2494

bzr remove on a file already removed from the working directory would
fail, but it doesn't anymore (similar to #2866 John just mentioned).

Wouter van Heyst
-------------- next part --------------
=== modified file 'bzrlib/selftest/blackbox.py'
--- bzrlib/selftest/blackbox.py
+++ bzrlib/selftest/blackbox.py
@@ -110,6 +110,14 @@
         file('foo.c', 'wt').write('int main() {}')
         self.runbzr(['add', 'foo.c'])
         self.runbzr(["commit", "-m", ""] , retcode=1) 
+
+    def test_remove_deleted(self):
+        self.runbzr("init")
+        self.build_tree(['a'])
+        self.runbzr(['add', 'a'])
+        self.runbzr(['commit', '-m', 'added a'])
+        os.unlink('a')
+        self.runbzr(['remove', 'a'])
 
     def test_other_branch_commit(self):
         # this branch is to ensure consistent behaviour, whether we're run



More information about the bazaar mailing list