2010-04-16 04:51:19 -05:00
|
|
|
"""
|
|
|
|
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.
|
2010-04-16 04:51:19 -05:00
|
|
|
:license: BSD, see LICENSE for details.
|
|
|
|
"""
|
|
|
|
|
|
|
|
from sphinx.domains.rst import parse_directive
|
|
|
|
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2016-06-11 10:00:52 -05:00
|
|
|
def test_parse_directive():
|
2018-12-15 08:02:28 -06:00
|
|
|
s = parse_directive(' foö ')
|
|
|
|
assert s == ('foö', '')
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2018-12-15 08:02:28 -06:00
|
|
|
s = parse_directive(' .. foö :: ')
|
|
|
|
assert s == ('foö', ' ')
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2018-12-15 08:02:28 -06:00
|
|
|
s = parse_directive('.. foö:: args1 args2')
|
|
|
|
assert s == ('foö', ' args1 args2')
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2010-04-16 04:51:19 -05:00
|
|
|
s = parse_directive('.. :: bar')
|
|
|
|
assert s == ('.. :: bar', '')
|