summaryrefslogtreecommitdiff
path: root/tests/test_build_htmlhelp.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-01-26 16:30:15 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-02-09 14:56:51 +0900
commit28b0b744b65e4bc3887cdc6a5898e92d86db07b7 (patch)
treec60411ff12e874426f9b04fed8c2ce999a2ed45f /tests/test_build_htmlhelp.py
parent264a4e83805025046041a6adb7cd3e017423c858 (diff)
downloadsphinx-git-28b0b744b65e4bc3887cdc6a5898e92d86db07b7.tar.gz
refactor: htmlhelp: Generate .hhp file from template
Diffstat (limited to 'tests/test_build_htmlhelp.py')
-rw-r--r--tests/test_build_htmlhelp.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_build_htmlhelp.py b/tests/test_build_htmlhelp.py
index 980a565e5..18acca921 100644
--- a/tests/test_build_htmlhelp.py
+++ b/tests/test_build_htmlhelp.py
@@ -19,6 +19,29 @@ from sphinx.config import Config
@pytest.mark.sphinx('htmlhelp', testroot='basic')
+def test_build_htmlhelp(app, status, warning):
+ app.build()
+
+ hhp = (app.outdir / 'pythondoc.hhp').text()
+ assert 'Compiled file=pythondoc.chm' in hhp
+ assert 'Contents file=pythondoc.hhc' in hhp
+ assert 'Default Window=pythondoc' in hhp
+ assert 'Default topic=index.html' in hhp
+ assert 'Full text search stop list file=pythondoc.stp' in hhp
+ assert 'Index file=pythondoc.hhk' in hhp
+ assert 'Language=0x409' in hhp
+ assert 'Title=Python documentation' in hhp
+ assert ('pythondoc="Python documentation","pythondoc.hhc",'
+ '"pythondoc.hhk","index.html","index.html",,,,,'
+ '0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0' in hhp)
+
+ files = ['genindex.html', 'index.html', '_static\\alabaster.css', '_static\\basic.css',
+ '_static\\custom.css', '_static\\file.png', '_static\\minus.png',
+ '_static\\plus.png', '_static\\pygments.css']
+ assert '[FILES]\n%s' % '\n'.join(files) in hhp
+
+
+@pytest.mark.sphinx('htmlhelp', testroot='basic')
def test_default_htmlhelp_file_suffix(app, warning):
assert app.builder.out_suffix == '.html'