diff options
author | Georg Brandl <georg@python.org> | 2015-01-21 08:33:36 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2015-01-21 08:33:36 +0100 |
commit | fe72d20b50c75089fa1262b9f03fcb29c9e49282 (patch) | |
tree | fb249a513bd3e4bde8fdf01c2448df20b1928a53 /tests/test_html_formatter.py | |
parent | 13705acbd57b936990c63a12de05ce29834b6afb (diff) | |
parent | 8cff73f38805fbd29af82fb2aa47956a4a93d22e (diff) | |
download | pygments-fe72d20b50c75089fa1262b9f03fcb29c9e49282.tar.gz |
merge with stable
Diffstat (limited to 'tests/test_html_formatter.py')
-rw-r--r-- | tests/test_html_formatter.py | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py index 79bf5072..a82aaaf7 100644 --- a/tests/test_html_formatter.py +++ b/tests/test_html_formatter.py @@ -68,15 +68,32 @@ class HtmlFormatterTest(unittest.TestCase): pass def test_all_options(self): - for optdict in [dict(nowrap=True), - dict(linenos=True), - dict(linenos=True, full=True), - dict(linenos=True, full=True, noclasses=True)]: - + def check(optdict): outfile = StringIO() fmt = HtmlFormatter(**optdict) fmt.format(tokensource, outfile) + for optdict in [ + dict(nowrap=True), + dict(linenos=True, full=True), + dict(linenos=True, linespans='L'), + dict(hl_lines=[1, 5, 10, 'xxx']), + dict(hl_lines=[1, 5, 10], noclasses=True), + ]: + check(optdict) + + for linenos in [False, 'table', 'inline']: + for noclasses in [False, True]: + for linenospecial in [0, 5]: + for anchorlinenos in [False, True]: + optdict = dict( + linenos=linenos, + noclasses=noclasses, + linenospecial=linenospecial, + anchorlinenos=anchorlinenos, + ) + check(optdict) + def test_linenos(self): optdict = dict(linenos=True) outfile = StringIO() |