Mercurial > public > mercurial-scm > hg
diff tests/test-bdiff.py @ 30428:3743e5dbb824
tests: explore some bdiff cases
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 08 Nov 2016 18:37:33 +0100 |
parents | ede7bc45bf0a |
children | 38ed54888617 |
line wrap: on
line diff
--- a/tests/test-bdiff.py Tue Nov 15 21:56:49 2016 +0100 +++ b/tests/test-bdiff.py Tue Nov 08 18:37:33 2016 +0100 @@ -78,3 +78,17 @@ testfixws("", "", 0) print("done") + +print("Odd diff for a trivial change:") +showdiff( + ''.join('<%s\n-\n' % i for i in range(5)), + ''.join('>%s\n-\n' % i for i in range(5))) + +print("Diff 1 to 3 lines - preference for adding / removing at the end of sequences:") +showdiff('a\n', 'a\n' * 3) +print("Diff 1 to 5 lines - preference for adding / removing at the end of sequences:") +showdiff('a\n', 'a\n' * 5) +print("Diff 3 to 1 lines - preference for adding / removing at the end of sequences:") +showdiff('a\n' * 3, 'a\n') +print("Diff 5 to 1 lines - this diff seems weird:") +showdiff('a\n' * 5, 'a\n')