summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-04-28 14:20:13 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-04-28 14:20:13 +0200
commit63705994322a57eca5c9df5eb4a7e9ed5415ff4d (patch)
tree37ae1386ab3c2c3cec15f0d5bdd2d04376acb138 /tests/test_commands.py
parent240383e171768e53a1b27144a9e054ced4d8da10 (diff)
downloadbzr-fastimport-63705994322a57eca5c9df5eb4a7e9ed5415ff4d.tar.gz
Add blackbox tests for 'bzr fast-import'.
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 67c47d0..f003f03 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -121,3 +121,17 @@ Head analysis:
\t[':1']\trefs/heads/master
Merges:
""")
+
+
+class TestFastImport(ExternalBase):
+
+ def test_empty(self):
+ self.build_tree_contents([('empty.fi', "")])
+ self.make_branch_and_tree("br")
+ self.assertEquals("", self.run_bzr("fast-import empty.fi br")[0])
+
+ def test_file(self):
+ tree = self.make_branch_and_tree("br")
+ self.build_tree_contents([('file.fi', simple_fast_import_stream)])
+ data = self.run_bzr("fast-import file.fi br")[0]
+ self.assertEquals(3, tree.branch.revno())