##// END OF EJS Templates
py2: remove simple from __future__ statements...
py2: remove simple from __future__ statements These were needed for Python 2 support. Now that our linter no longer mandates these, we can start deleting them. Differential Revision: https://phab.mercurial-scm.org/D12254

File last commit:

r49730:6000f5b2 default
r49730:6000f5b2 default
Show More
test-mdiff.py
22 lines | 567 B | text/x-python | PythonLexer
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__)