/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/test_parser.py

Here-document style commit messages (Samuel Bronson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
committer <bugs@bunny.org> now
102
102
data 20
103
103
first commit, empty
 
104
# Test a commit with a heredoc-style (delimited_data) messsage (bug #400960)
 
105
commit refs/heads/master
 
106
mark :4
 
107
author <bugs@bunny.org> now
 
108
committer <bugs@bunny.org> now
 
109
data <<EOF
 
110
Commit with heredoc-style message
 
111
EOF
104
112
"""
105
113
 
106
114
 
115
123
            if cmd.name == 'commit':
116
124
                for fc in cmd.file_iter():
117
125
                    result.append(fc)
118
 
        self.assertEqual(len(result), 10)
 
126
        self.assertEqual(len(result), 11)
119
127
        cmd1 = result.pop(0)
120
128
        self.assertEqual('progress', cmd1.name)
121
129
        self.assertEqual('completed', cmd1.message)
178
186
        self.assertEqual('commit', cmd.name)
179
187
        self.assertEqual('3', cmd.mark)
180
188
        self.assertEqual(None, cmd.from_)
 
189
        cmd = result.pop(0)
 
190
        self.assertEqual('commit', cmd.name)
 
191
        self.assertEqual('4', cmd.mark)
 
192
        self.assertEqual('Commit with heredoc-style message\n', cmd.message)
181
193
 
182
194
 
183
195
class TestStringParsing(tests.TestCase):