sphinx/tests/test_domain_rst.py

27 lines
612 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
"""
test_rst_domain
~~~~~~~~~~~~~~~
Tests the reStructuredText domain.
2017-12-31 10:06:58 -06:00
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from sphinx.domains.rst import parse_directive
2016-06-11 10:00:52 -05:00
def test_parse_directive():
2010-04-26 15:26:44 -05:00
s = parse_directive(u' foö ')
assert s == (u'foö', '')
2010-04-26 15:26:44 -05:00
s = parse_directive(u' .. foö :: ')
assert s == (u'foö', ' ')
2010-04-26 15:26:44 -05:00
s = parse_directive(u'.. foö:: args1 args2')
assert s == (u'foö', ' args1 args2')
s = parse_directive('.. :: bar')
assert s == ('.. :: bar', '')