2010-04-16 04:51:19 -05:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
test_rst_domain
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Tests the reStructuredText domain.
|
|
|
|
|
2016-01-14 15:54:04 -06:00
|
|
|
:copyright: Copyright 2007-2016 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():
|
2010-04-26 15:26:44 -05:00
|
|
|
s = parse_directive(u' foö ')
|
|
|
|
assert s == (u'foö', '')
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2010-04-26 15:26:44 -05:00
|
|
|
s = parse_directive(u' .. foö :: ')
|
|
|
|
assert s == (u'foö', ' ')
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2010-04-26 15:26:44 -05:00
|
|
|
s = parse_directive(u'.. foö:: args1 args2')
|
|
|
|
assert s == (u'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', '')
|