2010-04-16 04:51:19 -05:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
test_rst_domain
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Tests the reStructuredText domain.
|
|
|
|
|
|
|
|
:copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
|
|
|
|
:license: BSD, see LICENSE for details.
|
|
|
|
"""
|
|
|
|
|
|
|
|
from sphinx.domains.rst import parse_directive
|
|
|
|
|
|
|
|
def test_parse_directive():
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2010-04-16 04:51:19 -05:00
|
|
|
s = parse_directive(' foö ')
|
|
|
|
assert s == ('foö', '')
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2010-04-16 04:51:19 -05:00
|
|
|
s = parse_directive(' .. foö :: ')
|
|
|
|
assert s == ('foö', '')
|
2010-04-17 03:29:14 -05:00
|
|
|
|
2010-04-16 04:51:19 -05: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', '')
|