/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 bzrlib/tests/test_diff.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-06 17:57:05 UTC
  • mfrom: (3085.1.1 internal_diff_no_changes)
  • Revision ID: pqm@pqm.ubuntu.com-20071206175705-a3go0hme7nx1rr69
(John Arbash Meinel) Fix internal_diff to not abort when the texts
        are identical.

Show diffs side-by-side

added added

removed removed

Lines of Context:
239
239
                          ]
240
240
                          , lines)
241
241
 
 
242
    def test_internal_diff_no_content(self):
 
243
        output = StringIO()
 
244
        internal_diff(u'old', [], u'new', [], output)
 
245
        self.assertEqual('', output.getvalue())
 
246
 
 
247
    def test_internal_diff_no_changes(self):
 
248
        output = StringIO()
 
249
        internal_diff(u'old', ['text\n', 'contents\n'],
 
250
                      u'new', ['text\n', 'contents\n'],
 
251
                      output)
 
252
        self.assertEqual('', output.getvalue())
 
253
 
242
254
    def test_internal_diff_returns_bytes(self):
243
255
        import StringIO
244
256
        output = StringIO.StringIO()