~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_patches.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-17 19:28:43 UTC
  • mfrom: (1551.18.9 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070817192843-0jaoxooskia72irk
Patch parser handles diff -p patches

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