summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-01 22:17:18 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-01 22:17:18 +0100
commitf5fca7c6944e92206a5488aecb81779fd52bfdd1 (patch)
tree22bfe769a2843bd6f4c780f48d59c3cce928410b /tests/test_commands.py
parente3ffb72b1c05bb2df4d8ab6542b3afd016dab88d (diff)
downloadbzr-fastimport-f5fca7c6944e92206a5488aecb81779fd52bfdd1.tar.gz
Print sane error when a fastimport file is incomplete.
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 5053416..88fefd2 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -228,6 +228,16 @@ class TestFastImport(ExternalBase):
data = self.run_bzr("fast-import file.fi br")[0]
self.assertEquals(1, tree.branch.revno())
+ def test_missing_bytes(self):
+ self.build_tree_contents([('empty.fi', """
+commit refs/heads/master
+mark :1
+committer
+data 15
+""")])
+ self.make_branch_and_tree("br")
+ self.run_bzr_error(['bzr: ERROR: 4: Parse error: line 4: Command commit is missing section committer\n'], "fast-import empty.fi br")
+
class TestFastImportFilter(ExternalBase):