diff options
| author | Georg Brandl <georg@python.org> | 2008-11-04 08:34:35 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2008-11-04 08:34:35 +0100 |
| commit | e89d87526c1aa79bd6622f5f261fbfe8e987f5bb (patch) | |
| tree | 668c9b00c1a94d77561b8d9a729f27be777d49a0 /tests | |
| parent | e39ddb3d59f3543c5d1f5f10f4051d84b6194dbd (diff) | |
| download | sphinx-e89d87526c1aa79bd6622f5f261fbfe8e987f5bb.tar.gz | |
Add -A option to pass values into HTML templates.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/root/_templates/layout.html | 4 | ||||
| -rw-r--r-- | tests/root/conf.py | 2 | ||||
| -rw-r--r-- | tests/test_build.py | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/root/_templates/layout.html b/tests/root/_templates/layout.html new file mode 100644 index 00000000..1f4688e6 --- /dev/null +++ b/tests/root/_templates/layout.html @@ -0,0 +1,4 @@ +{% extends "!layout.html" %} +{% block extrahead %} +<meta name="hc" content="{{ hckey }}" /> +{% endblock %} diff --git a/tests/root/conf.py b/tests/root/conf.py index f8142205..8d2b276f 100644 --- a/tests/root/conf.py +++ b/tests/root/conf.py @@ -133,6 +133,8 @@ html_last_updated_fmt = '%b %d, %Y' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = '' +html_context = {'hckey': 'hcval'} + # Output file base name for HTML help builder. htmlhelp_basename = 'SphinxTestsdoc' diff --git a/tests/test_build.py b/tests/test_build.py index a3d10df1..07a94696 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -67,6 +67,7 @@ HTML_XPATH = { ".//a[@href='#mod.Cls']": '', }, 'contents.html': { + ".//meta[@name='hc'][@content='hcval']": '', ".//td[@class='label']": '[Ref1]', }, } |
