Show More
@@ -6,7 +6,6 b' import sys' | |||||
6 |
|
6 | |||
7 | from mercurial import ( |
|
7 | from mercurial import ( | |
8 | mdiff, |
|
8 | mdiff, | |
9 | mpatch, |
|
|||
10 | ) |
|
9 | ) | |
11 |
|
10 | |||
12 | def reducetest(a, b): |
|
11 | def reducetest(a, b): | |
@@ -45,7 +44,7 b' def test1(a, b):' | |||||
45 | d = mdiff.textdiff(a, b) |
|
44 | d = mdiff.textdiff(a, b) | |
46 | if not d: |
|
45 | if not d: | |
47 | raise ValueError("empty") |
|
46 | raise ValueError("empty") | |
48 |
c = m |
|
47 | c = mdiff.patches(a, [d]) | |
49 | if c != b: |
|
48 | if c != b: | |
50 | raise ValueError("bad") |
|
49 | raise ValueError("bad") | |
51 |
|
50 |
@@ -5,7 +5,6 b' import unittest' | |||||
5 |
|
5 | |||
6 | from mercurial import ( |
|
6 | from mercurial import ( | |
7 | mdiff, |
|
7 | mdiff, | |
8 | mpatch, |
|
|||
9 | ) |
|
8 | ) | |
10 |
|
9 | |||
11 | class diffreplace( |
|
10 | class diffreplace( | |
@@ -19,7 +18,7 b' class BdiffTests(unittest.TestCase):' | |||||
19 | d = mdiff.textdiff(a, b) |
|
18 | d = mdiff.textdiff(a, b) | |
20 | c = a |
|
19 | c = a | |
21 | if d: |
|
20 | if d: | |
22 |
c = m |
|
21 | c = mdiff.patches(a, [d]) | |
23 | self.assertEqual( |
|
22 | self.assertEqual( | |
24 | c, b, ("bad diff+patch result from\n %r to\n " |
|
23 | c, b, ("bad diff+patch result from\n %r to\n " | |
25 | "%r: \nbdiff: %r\npatched: %r" % (a, b, d, c[:200]))) |
|
24 | "%r: \nbdiff: %r\npatched: %r" % (a, b, d, c[:200]))) |
General Comments 0
You need to be logged in to leave comments.
Login now