diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-24 14:32:13 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-24 14:32:13 +0900 |
commit | 502c4ee5fbef6bf51fe60cc820b1484471dd1b32 (patch) | |
tree | 0407a81eb4013f90cc62ae9ad8f1e1b8a51c16db /tests/test_build_html.py | |
parent | ee5560b7739932d0a7735be0cc81f28d76a61e92 (diff) | |
parent | becf8f43befe8a1528552106848c0e369b7fba9a (diff) | |
download | sphinx-git-502c4ee5fbef6bf51fe60cc820b1484471dd1b32.tar.gz |
Merge branch '3.x'
Diffstat (limited to 'tests/test_build_html.py')
-rw-r--r-- | tests/test_build_html.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 6bfbe422b..9f8b09ee6 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -1641,3 +1641,23 @@ def test_highlight_options_old(app): location=ANY, opts={}) assert call_args[2] == call(ANY, 'java', force=False, linenos=False, location=ANY, opts={}) + + +@pytest.mark.sphinx('html', testroot='basic', + confoverrides={'html_permalinks': False}) +def test_html_permalink_disable(app): + app.build() + content = (app.outdir / 'index.html').read_text() + + assert '<h1>The basic Sphinx documentation for testing</h1>' in content + + +@pytest.mark.sphinx('html', testroot='basic', + confoverrides={'html_permalinks_icon': '<span>[PERMALINK]</span>'}) +def test_html_permalink_icon(app): + app.build() + content = (app.outdir / 'index.html').read_text() + + assert ('<h1>The basic Sphinx documentation for testing<a class="headerlink" ' + 'href="#the-basic-sphinx-documentation-for-testing" ' + 'title="Permalink to this headline"><span>[PERMALINK]</span></a></h1>' in content) |