Mercurial > hg-stable
view tests/test-mdiff.py @ 36270:881596e51fca
gitweb: make span.age CSS selector more specific
This set of CSS properties is only used on /changelog page to make age elements
float to the left and be fixed in size, but span.a is too broad of a selector,
because we don't want to apply these properties to all <span> elements that
have age class.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 15 Feb 2018 21:05:31 +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__)