Completed test coverage for utils.text.Truncator.chars().

This commit is contained in:
Hasan Ramezani 2019-01-20 00:45:41 +01:00 committed by Tim Graham
parent d8a2f4ec09
commit 838e432e3e
1 changed files with 1 additions and 0 deletions

View File

@ -58,6 +58,7 @@ class TestUtilsText(SimpleTestCase):
self.assertEqual('The quick brown fox jumped over the lazy dog.', truncator.chars(100)), self.assertEqual('The quick brown fox jumped over the lazy dog.', truncator.chars(100)),
self.assertEqual('The quick brown fox …', truncator.chars(21)), self.assertEqual('The quick brown fox …', truncator.chars(21)),
self.assertEqual('The quick brown fo.....', truncator.chars(23, '.....')), self.assertEqual('The quick brown fo.....', truncator.chars(23, '.....')),
self.assertEqual('.....', truncator.chars(4, '.....')),
nfc = text.Truncator('o\xfco\xfco\xfco\xfc') nfc = text.Truncator('o\xfco\xfco\xfco\xfc')
nfd = text.Truncator('ou\u0308ou\u0308ou\u0308ou\u0308') nfd = text.Truncator('ou\u0308ou\u0308ou\u0308ou\u0308')