diff options
Diffstat (limited to 'tests/test_html_formatter.py')
-rw-r--r-- | tests/test_html_formatter.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py index ac73b616..e1a02b24 100644 --- a/tests/test_html_formatter.py +++ b/tests/test_html_formatter.py @@ -93,6 +93,14 @@ def test_all_options(): check(optdict) +def test_linespans(): + outfile = StringIO() + fmt = HtmlFormatter(linespans='L', anchorlinenos=True, linenos="inline") + fmt.format(tokensource, outfile) + html = outfile.getvalue() + assert re.search(r"""<span id="L-1">\s*<a href="#L-1"><span\s*class="linenos">\s*1</span></a>""", html) + + def test_lineanchors(): optdict = dict(lineanchors="foo") outfile = StringIO() |