Mercurial > hg
comparison tests/test-bdiff @ 7471:94ecd4922a23
use repr() instead of backticks
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 06 Dec 2008 15:37:15 +0100 |
parents | 9514cbb6e4f6 |
children |
comparison
equal
deleted
inserted
replaced
7470:1d58c0491d5e | 7471:94ecd4922a23 |
---|---|
7 d = bdiff.bdiff(a, b) | 7 d = bdiff.bdiff(a, b) |
8 c = a | 8 c = a |
9 if d: | 9 if d: |
10 c = mpatch.patches(a, [d]) | 10 c = mpatch.patches(a, [d]) |
11 if c != b: | 11 if c != b: |
12 print "***", `a`, `b` | 12 print "***", repr(a), repr(b) |
13 print "bad:" | 13 print "bad:" |
14 print `c`[:200] | 14 print repr(c)[:200] |
15 print `d` | 15 print repr(d) |
16 | 16 |
17 def test(a, b): | 17 def test(a, b): |
18 print "***", `a`, `b` | 18 print "***", repr(a), repr(b) |
19 test1(a, b) | 19 test1(a, b) |
20 test1(b, a) | 20 test1(b, a) |
21 | 21 |
22 test("a\nc\n\n\n\n", "a\nb\n\n\n") | 22 test("a\nc\n\n\n\n", "a\nb\n\n\n") |
23 test("a\nb\nc\n", "a\nc\n") | 23 test("a\nb\nc\n", "a\nc\n") |