py3: add b'' prefixes in test-mdiff.py
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D2354
--- a/tests/test-mdiff.py Mon Feb 19 21:18:52 2018 +0530
+++ b/tests/test-mdiff.py Mon Feb 19 21:45:49 2018 +0530
@@ -10,11 +10,11 @@
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'],
+ 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)