Rev 20: Some more blackbox tests. in file:///data/jelmer/bzr-rebase/trunk/
Jelmer Vernooij
jelmer at samba.org
Thu Jul 12 09:22:43 BST 2007
At file:///data/jelmer/bzr-rebase/trunk/
------------------------------------------------------------
revno: 20
revision-id: jelmer at samba.org-20070709210051-8ekdsszc207gqs5u
parent: jelmer at samba.org-20070709204402-2gnnfvop0j2mgoe2
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2007-07-09 22:00:51 +0100
message:
Some more blackbox tests.
modified:
test_blackbox.py test_blackbox.py-20070709202607-dyvt95dfu09tuv6a-1
test_rebase.py test_rebase.py-20070626221123-ellanmf93nw8z9r1-2
=== modified file 'test_blackbox.py'
--- a/test_blackbox.py 2007-07-09 20:44:02 +0000
+++ b/test_blackbox.py 2007-07-09 21:00:51 +0000
@@ -51,3 +51,43 @@
self.run_bzr('commit -m this')
self.check_output('', 'rebase ../main')
self.check_output('3\n', 'revno')
+
+ def test_conflicting(self):
+ self.make_file('hello', '42')
+ self.run_bzr('commit -m that')
+ os.chdir('../feature')
+ self.make_file('hello', "other data")
+ self.run_bzr('commit -m this')
+ self.run_bzr_error('Text conflict in hello\nbzr: ERROR: A conflict occurred replaying a commit. Resolve the conflict and run \'bzr rebase-continue\' or run \'bzr rebase-abort\'.\n', 'rebase ../main')
+
+ def test_conflicting_abort(self):
+ self.make_file('hello', '42')
+ self.run_bzr('commit -m that')
+ os.chdir('../feature')
+ self.make_file('hello', "other data")
+ self.run_bzr('commit -m this')
+ old_log = self.run_bzr('log')[0]
+ self.run_bzr_error('Text conflict in hello\nbzr: ERROR: A conflict occurred replaying a commit. Resolve the conflict and run \'bzr rebase-continue\' or run \'bzr rebase-abort\'.\n', 'rebase ../main')
+ self.check_output('', 'rebase-abort')
+ self.check_output(old_log, 'log')
+
+ def test_conflicting_continue(self):
+ self.make_file('hello', '42')
+ self.run_bzr('commit -m that')
+ os.chdir('../feature')
+ self.make_file('hello', "other data")
+ self.run_bzr('commit -m this')
+ self.run_bzr_error('Text conflict in hello\nbzr: ERROR: A conflict occurred replaying a commit. Resolve the conflict and run \'bzr rebase-continue\' or run \'bzr rebase-abort\'.\n', 'rebase ../main')
+ self.run_bzr('resolved hello')
+ self.check_output('', 'rebase-continue')
+ self.check_output('3\n', 'revno')
+
+ def test_continue_nothing(self):
+ self.run_bzr_error('bzr: ERROR: No rebase to continue',
+ 'rebase-continue')
+
+ def test_abort_nothing(self):
+ self.run_bzr_error('bzr: ERROR: No rebase to abort',
+ 'rebase-abort')
+
+
=== modified file 'test_rebase.py'
--- a/test_rebase.py 2007-07-09 20:18:58 +0000
+++ b/test_rebase.py 2007-07-09 21:00:51 +0000
@@ -71,8 +71,10 @@
["bloe"])
self.assertEqual("bla4", newrev)
self.assertTrue(wt.branch.repository.has_revision(newrev))
- self.assertEqual(["bloe"], wt.branch.repository.revision_parents(newrev))
- self.assertEqual("bla2", wt.branch.repository.get_revision(newrev).properties["rebase-of"])
+ self.assertEqual(["bloe"],
+ wt.branch.repository.revision_parents(newrev))
+ self.assertEqual("bla2",
+ wt.branch.repository.get_revision(newrev).properties["rebase-of"])
class PlanCreatorTests(TestCaseWithTransport):
@@ -208,6 +210,7 @@
self.assertEquals(((1, "bla"), {"oldrev": ("newrev", ["newparent1", "newparent2"])}),
read_rebase_plan(wt))
+
class CurrentRevidFileTests(TestCaseWithTransport):
def test_read_nonexistant(self):
wt = self.make_branch_and_tree('.')
@@ -233,6 +236,7 @@
write_active_rebase_revid(wt, None)
self.assertIs(None, read_active_rebase_revid(wt))
+
class RebaseTodoTests(TestCase):
def test_done(self):
class Repository:
More information about the bazaar-commits
mailing list