diff options
author | Georg Brandl <georg@python.org> | 2014-11-11 19:40:50 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-11-11 19:40:50 +0100 |
commit | 543b3cb13bbafa81805b039fe955e60794b4ae5e (patch) | |
tree | 2a32ea26a435368a351f639725eadf62c6df2c6d /tests | |
parent | 6449543ebb434d613ee6d3a57ea9cc527b7aeeef (diff) | |
download | pygments-543b3cb13bbafa81805b039fe955e60794b4ae5e.tar.gz |
More coverage of newer HTML formatter options.
Diffstat (limited to 'tests')
-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 5b1b2576..92a0415b 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() |