~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_diff.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-31 19:15:36 UTC
  • mto: (1900.2.1 bzr.merge.54651)
  • mto: This revision was merged to the branch mainline in revision 1903.
  • Revision ID: john@arbash-meinel.com-20060731191536-ca772e434471e8cf
internal_diff always adds a trailing \n, make sure external_diff does too

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
    def test_external_diff(self):
100
100
        lines = external_udiff_lines(['boo\n'], ['goo\n'])
101
101
        self.check_patch(lines)
 
102
        self.assertEqual('\n', lines[-1])
102
103
 
103
104
    def test_external_diff_no_fileno(self):
104
105
        # Make sure that we can handle not having a fileno, even
110
111
 
111
112
    def test_external_diff_binary(self):
112
113
        lines = external_udiff_lines(['\x00foobar\n'], ['foo\x00bar\n'])
113
 
        self.assertEqual(['Binary files old and new differ\n'], lines)
 
114
        self.assertEqual(['Binary files old and new differ\n', '\n'], lines)
114
115
 
115
116
    def test_no_external_diff(self):
116
117
        """Check that NoDiff is raised when diff is not available"""