def test_splitTabbedLineToShorterTabbedLinesShortTabbedParagraph(self): text = '[t]a first right shifted' width = 30 list = HelpUtil._splitTabbedLineToShorterTabbedLines(text, width) self.assertEqual(1, len(list)) self.assertEqual(list[0],'[t]a first right shifted')
def test_splitTabbedLineContainingMarkupsToShorterTabbedLines(self): text = '[t][b][color=ffff00ff]<options>[/color][/b] options are specified using [b][color=ffff00ff]-[/color][/b], like [b][color=ffff00ff]-v[/color][/b] or [b][color=ffff00ff]-f[/color][/b]. More details below' width = 54 list = HelpUtil._splitTabbedLineToShorterTabbedLines(text, width) self.assertEqual(2, len(list)) self.assertEqual('[t][b][color=ffff00ff]<options>[/color][/b] options are specified using [b][color=ffff00ff]-[/color][/b], like [b][color=ffff00ff]-v[/color][/b]', list[0]) self.assertEqual('[t]or [b][color=ffff00ff]-f[/color][/b]. More details below', list[1])