summaryrefslogtreecommitdiff
path: root/tests/test_build_html.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-04-04 10:44:53 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-04-08 11:54:01 +0900
commit939f01eae3fcf4c687ba75d5bbb052d07da0c0e0 (patch)
treee85ecbe7d6ad4cb1e3457c959c42049661d9784d /tests/test_build_html.py
parentfc41f43a70eb81c6428c7f995e8570848e6921db (diff)
downloadsphinx-git-939f01eae3fcf4c687ba75d5bbb052d07da0c0e0.tar.gz
Fix #3594: LaTeX: single raw directive has been considereed as block level element
Diffstat (limited to 'tests/test_build_html.py')
-rw-r--r--tests/test_build_html.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index def6722c3..d4f37c787 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -1180,3 +1180,17 @@ def test_html_inventory(app):
'',
'http://example.com/index.html',
'The basic Sphinx documentation for testing')
+
+
+@pytest.mark.sphinx('html', testroot='directives-raw')
+def test_html_raw_directive(app, status, warning):
+ app.builder.build_all()
+ result = (app.outdir / 'index.html').text(encoding='utf8')
+
+ # standard case
+ assert 'standalone raw directive (HTML)' in result
+ assert 'standalone raw directive (LaTeX)' not in result
+
+ # with substitution
+ assert '<p>HTML: abc def ghi</p>' in result
+ assert '<p>LaTeX: abc ghi</p>' in result