Show More
@@ -78,3 +78,17 b' testfixws("", "", 1)' | |||||
78 | testfixws("", "", 0) |
|
78 | testfixws("", "", 0) | |
79 |
|
79 | |||
80 | print("done") |
|
80 | print("done") | |
|
81 | ||||
|
82 | print("Odd diff for a trivial change:") | |||
|
83 | showdiff( | |||
|
84 | ''.join('<%s\n-\n' % i for i in range(5)), | |||
|
85 | ''.join('>%s\n-\n' % i for i in range(5))) | |||
|
86 | ||||
|
87 | print("Diff 1 to 3 lines - preference for adding / removing at the end of sequences:") | |||
|
88 | showdiff('a\n', 'a\n' * 3) | |||
|
89 | print("Diff 1 to 5 lines - preference for adding / removing at the end of sequences:") | |||
|
90 | showdiff('a\n', 'a\n' * 5) | |||
|
91 | print("Diff 3 to 1 lines - preference for adding / removing at the end of sequences:") | |||
|
92 | showdiff('a\n' * 3, 'a\n') | |||
|
93 | print("Diff 5 to 1 lines - this diff seems weird:") | |||
|
94 | showdiff('a\n' * 5, 'a\n') |
@@ -42,3 +42,41 b' showdiff(' | |||||
42 | 'f\n' |
|
42 | 'f\n' | |
43 | done |
|
43 | done | |
44 | done |
|
44 | done | |
|
45 | Odd diff for a trivial change: | |||
|
46 | showdiff( | |||
|
47 | '<0\n-\n<1\n-\n<2\n-\n<3\n-\n<4\n-\n', | |||
|
48 | '>0\n-\n>1\n-\n>2\n-\n>3\n-\n>4\n-\n'): | |||
|
49 | 0 8 '<0\n-\n<1\n' -> '>0\n' | |||
|
50 | '-\n' | |||
|
51 | 10 13 '<2\n' -> '>1\n' | |||
|
52 | '-\n' | |||
|
53 | 15 18 '<3\n' -> '>2\n' | |||
|
54 | '-\n' | |||
|
55 | 20 23 '<4\n' -> '>3\n' | |||
|
56 | '-\n' | |||
|
57 | 25 25 '' -> '>4\n-\n' | |||
|
58 | Diff 1 to 3 lines - preference for adding / removing at the end of sequences: | |||
|
59 | showdiff( | |||
|
60 | 'a\n', | |||
|
61 | 'a\na\na\n'): | |||
|
62 | 'a\n' | |||
|
63 | 2 2 '' -> 'a\na\n' | |||
|
64 | Diff 1 to 5 lines - preference for adding / removing at the end of sequences: | |||
|
65 | showdiff( | |||
|
66 | 'a\n', | |||
|
67 | 'a\na\na\na\na\n'): | |||
|
68 | 'a\n' | |||
|
69 | 2 2 '' -> 'a\na\na\na\n' | |||
|
70 | Diff 3 to 1 lines - preference for adding / removing at the end of sequences: | |||
|
71 | showdiff( | |||
|
72 | 'a\na\na\n', | |||
|
73 | 'a\n'): | |||
|
74 | 'a\n' | |||
|
75 | 2 6 'a\na\n' -> '' | |||
|
76 | Diff 5 to 1 lines - this diff seems weird: | |||
|
77 | showdiff( | |||
|
78 | 'a\na\na\na\na\n', | |||
|
79 | 'a\n'): | |||
|
80 | 0 2 'a\n' -> '' | |||
|
81 | 'a\n' | |||
|
82 | 4 10 'a\na\na\n' -> '' |
General Comments 0
You need to be logged in to leave comments.
Login now