Mercurial > hg
view tests/test-mdiff.py @ 36069:957e773614d0
wireprotoserver: rename _client to client (API)
This method is called in wireproto.py. It should be part of the public
API/interface.
.. api::
The ``_client()`` method of the wire protocol handler interface has
been renamed to ``client()``.
Differential Revision: https://phab.mercurial-scm.org/D2084
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 07 Feb 2018 20:24:22 -0800 |
parents | 1ab7b16c9437 |
children | 58c1368ab629 |
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 = {'a\nb\nc\n': ['a\n', 'b\n', 'c\n'], 'a\nb\nc': ['a\n', 'b\n', 'c'], 'a\nb\nc\n\n': ['a\n', 'b\n', 'c\n', '\n'], '': [], 'abcabc': ['abcabc'], } for inp, want in cases.iteritems(): self.assertEqual(mdiff.splitnewlines(inp), want) if __name__ == '__main__': import silenttestrunner silenttestrunner.main(__name__)