summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Bronson <naesten@gmail.com>2009-07-18 19:07:37 -0400
committerSamuel Bronson <naesten@gmail.com>2009-07-18 19:07:37 -0400
commit56c16165be3bbb85ae817ac1afdb04adac0875ff (patch)
tree1c5be2ddc0dd61f393f1f575c3beadbb456d57ff
parent9e0a659f753df4f05e3f9e26ed904c8f70860406 (diff)
downloadbzr-fastimport-56c16165be3bbb85ae817ac1afdb04adac0875ff.tar.gz
Add a test for bug #400960.
-rw-r--r--tests/test_parser.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index ac5239e..91e27f0 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -101,6 +101,14 @@ author <bugs@bunny.org> now
committer <bugs@bunny.org> now
data 20
first commit, empty
+# Test a commit with a heredoc-style (delimited_data) messsage (bug #400960)
+commit refs/heads/master
+mark :4
+author <bugs@bunny.org> now
+committer <bugs@bunny.org> now
+data <<EOF
+Commit with heredoc-style message
+EOF
"""
@@ -115,7 +123,7 @@ class TestImportParser(tests.TestCase):
if cmd.name == 'commit':
for fc in cmd.file_iter():
result.append(fc)
- self.assertEqual(len(result), 10)
+ self.assertEqual(len(result), 11)
cmd1 = result.pop(0)
self.assertEqual('progress', cmd1.name)
self.assertEqual('completed', cmd1.message)
@@ -178,6 +186,10 @@ class TestImportParser(tests.TestCase):
self.assertEqual('commit', cmd.name)
self.assertEqual('3', cmd.mark)
self.assertEqual(None, cmd.from_)
+ cmd = result.pop(0)
+ self.assertEqual('commit', cmd.name)
+ self.assertEqual('4', cmd.mark)
+ self.assertEqual('Commit with heredoc-style message\n', cmd.message)
class TestStringParsing(tests.TestCase):