Mercurial > hg
view tests/test-mdiff.py @ 39121:7c6044634957
help: describe more detail about capabilities while deciding merge tool
"hg help merge-tools" describes as below:
(internal merge tools) will by default not handle symlinks or
binary files.
But in some cases, Mercurial assumes that internal merge tools have
one or both of these capabilities.
"hg help merge-tools" also describes as below, for matching patterns in
merge-patterns configuration section. But this is not sufficient.
Here, binary capabilities of the merge tool are not considered.
This patch describes more detail about capabilities while deciding
merge tool.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 14 Aug 2018 20:05:36 +0900 |
parents | 8d0b0b533e09 |
children | 2372284d9457 |
line wrap: on
line source
from __future__ import absolute_import from __future__ import print_function import unittest from mercurial import ( mdiff, ) class splitnewlinesTests(unittest.TestCase): def test_splitnewlines(self): cases = {b'a\nb\nc\n': [b'a\n', b'b\n', b'c\n'], b'a\nb\nc': [b'a\n', b'b\n', b'c'], b'a\nb\nc\n\n': [b'a\n', b'b\n', b'c\n', b'\n'], b'': [], b'abcabc': [b'abcabc'], } for inp, want in cases.items(): self.assertEqual(mdiff.splitnewlines(inp), want) if __name__ == '__main__': import silenttestrunner silenttestrunner.main(__name__)