diff options
author | Jonathan Sharpe <j.r.sharpe+github@gmail.com> | 2015-11-08 16:46:23 +0000 |
---|---|---|
committer | Jonathan Sharpe <j.r.sharpe+github@gmail.com> | 2015-11-08 16:46:23 +0000 |
commit | b82a8e45fa5b17ef5f15a410bfd5b694e5a07cba (patch) | |
tree | 0600a08bcf93b6aaa20b931e0715ea7e39fe7276 /tests | |
parent | 4d95d001345011e1e0efadb54dbb19b616193b1a (diff) | |
download | pycco-b82a8e45fa5b17ef5f15a410bfd5b694e5a07cba.tar.gz |
Added test for parsing of comments with only cross-references
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_pycco.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_pycco.py b/tests/test_pycco.py index 5a38dd5..7248a1a 100644 --- a/tests/test_pycco.py +++ b/tests/test_pycco.py @@ -60,6 +60,13 @@ def test_multi_line_leading_spaces(): assert parsed[0]["docs_text"] == "This is a\ncomment that\nis indented\n" +def test_comment_with_only_cross_ref(): + source = '''# ==Link Target==\n\ndef test_link():\n """[[testing.py#link-target]]"""\n pass''' + sections = p.parse(source, PYTHON) + p.highlight(sections, PYTHON, outdir=tempfile.gettempdir()) + assert sections[1]['docs_html'] == '<p><a href="testing.html#link-target">testing.py</a></p>' + + @given(text(), text()) def test_get_language_specify_language(source, code): assert p.get_language(source, code, language="python") == p.languages['.py'] |