~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_patches.py

  • Committer: Andrew Bennetts
  • Date: 2007-08-30 08:11:54 UTC
  • mfrom: (2766 +trunk)
  • mto: (2535.3.55 repo-refactor)
  • mto: This revision was merged to the branch mainline in revision 2772.
  • Revision ID: andrew.bennetts@canonical.com-20070830081154-16hebp2xwr15x2hc
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        assert (hunk.mod_range == 0)
75
75
        assert (str(hunk) == header)
76
76
 
 
77
    def testPDiff(self):
 
78
        """Parse a hunk header produced by diff -p"""
 
79
        header = "@@ -407,7 +292,7 @@ bzr 0.18rc1  2007-07-10\n"
 
80
        hunk = hunk_from_header(header)
 
81
        self.assertEqual('bzr 0.18rc1  2007-07-10', hunk.tail)
 
82
        self.assertEqual(header, str(hunk))
 
83
 
77
84
    def makeMalformed(self, header):
78
85
        self.assertRaises(MalformedHunkHeader, hunk_from_header, header)
79
86