Test suite adapted after :option: changes.

This commit is contained in:
Georg Brandl 2014-09-20 20:54:23 +02:00
parent febde8187e
commit e21d669089
2 changed files with 5 additions and 4 deletions

View File

@ -43,7 +43,7 @@ reading included file u'.*?wrongenc.inc' seems to be wrong, try giving an \
:encoding: option\\n? :encoding: option\\n?
%(root)s/includes.txt:4: WARNING: download file not readable: .*?nonexisting.png %(root)s/includes.txt:4: WARNING: download file not readable: .*?nonexisting.png
%(root)s/markup.txt:\\d+: WARNING: Malformed :option: u'Python c option', does \ %(root)s/markup.txt:\\d+: WARNING: Malformed :option: u'Python c option', does \
not contain option marker - or -- or / not contain option marker - or -- or / or \\+
""" """
HTML_WARNINGS = ENV_WARNINGS + """\ HTML_WARNINGS = ENV_WARNINGS + """\
@ -144,7 +144,7 @@ HTML_XPATH = {
(".//a[@href='subdir/includes.html']" (".//a[@href='subdir/includes.html']"
"[@class='reference internal']/em", 'Including in subdir'), "[@class='reference internal']/em", 'Including in subdir'),
(".//a[@href='objects.html#cmdoption-python-c']" (".//a[@href='objects.html#cmdoption-python-c']"
"[@class='reference internal']/em", 'Python -c option'), "[@class='reference internal']/code/span[@class='pre']", '-c'),
# abbreviations # abbreviations
(".//abbr[@title='abbreviation']", '^abbr$'), (".//abbr[@title='abbreviation']", '^abbr$'),
# version stuff # version stuff

View File

@ -108,8 +108,9 @@ def test_inline():
# non-interpolation of dashes in option role # non-interpolation of dashes in option role
yield (verify_re, ':option:`--with-option`', yield (verify_re, ':option:`--with-option`',
'<p><em( class="xref std std-option")?>--with-option</em></p>$', '<p><code( class="xref std std-option docutils literal")?>'
r'\\emph{\\texttt{-{-}with-option}}$') '<span class="pre">--with-option</span></code></p>$',
r'\\code{-{-}with-option}$')
# verify smarty-pants quotes # verify smarty-pants quotes
yield verify, '"John"', '<p>&#8220;John&#8221;</p>', "``John''" yield verify, '"John"', '<p>&#8220;John&#8221;</p>', "``John''"