summaryrefslogtreecommitdiff
path: root/tests/roots
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roots')
-rw-r--r--tests/roots/test-api-set-translator/conf.py80
-rw-r--r--tests/roots/test-api-set-translator/index.rst3
-rw-r--r--tests/roots/test-api-set-translator/nonext/conf.py9
-rw-r--r--tests/roots/test-api-set-translator/translator.py6
-rw-r--r--tests/roots/test-autosummary/conf.py4
-rw-r--r--tests/roots/test-autosummary/contents.rst3
-rw-r--r--tests/roots/test-autosummary/sphinx.rst31
-rw-r--r--tests/roots/test-build-text/conf.py2
-rw-r--r--tests/roots/test-build-text/contents.txt8
-rw-r--r--tests/roots/test-build-text/lineblock.txt6
-rw-r--r--tests/roots/test-build-text/maxwidth.txt6
-rw-r--r--tests/roots/test-build-text/nonascii_maxwidth.txt5
-rw-r--r--tests/roots/test-build-text/nonascii_table.txt7
-rw-r--r--tests/roots/test-build-text/nonascii_title.txt2
-rw-r--r--tests/roots/test-build-text/table.txt7
-rw-r--r--tests/roots/test-circular/conf.py0
-rw-r--r--tests/roots/test-circular/contents.rst4
-rw-r--r--tests/roots/test-circular/sub.rst3
-rw-r--r--tests/roots/test-directive-code/caption.rst21
-rw-r--r--tests/roots/test-directive-code/conf.py3
-rw-r--r--tests/roots/test-directive-code/dedent.rst35
-rw-r--r--tests/roots/test-directive-code/dedent_code.rst53
-rw-r--r--tests/roots/test-directive-code/index.rst25
-rw-r--r--tests/roots/test-directive-code/lineno_match.rst17
-rw-r--r--tests/roots/test-directive-code/lineno_start.rst6
-rw-r--r--tests/roots/test-directive-code/linenos.rst6
-rw-r--r--tests/roots/test-directive-code/literal.inc13
-rw-r--r--tests/roots/test-directive-only/conf.py2
-rw-r--r--tests/roots/test-directive-only/contents.rst (renamed from tests/roots/test-only-directive/contents.rst)2
-rw-r--r--tests/roots/test-directive-only/only.rst (renamed from tests/roots/test-only-directive/only.rst)0
-rw-r--r--tests/roots/test-doctest/conf.py5
-rw-r--r--tests/roots/test-doctest/doctest.txt129
-rw-r--r--tests/roots/test-docutilsconf/contents.txt30
-rw-r--r--tests/roots/test-ext-viewcode/conf.py24
-rw-r--r--tests/roots/test-ext-viewcode/index.rst34
-rw-r--r--tests/roots/test-ext-viewcode/objects.rst169
-rw-r--r--tests/roots/test-ext-viewcode/spam/__init__.py7
-rw-r--r--tests/roots/test-ext-viewcode/spam/mod1.py15
-rw-r--r--tests/roots/test-ext-viewcode/spam/mod2.py15
-rw-r--r--tests/roots/test-intl/admonitions.po2
-rw-r--r--tests/roots/test-intl/conf.py1
-rw-r--r--tests/roots/test-intl/definition_terms.po2
-rw-r--r--tests/roots/test-intl/docfields.po2
-rw-r--r--tests/roots/test-intl/external_links.po2
-rw-r--r--tests/roots/test-intl/figure_caption.po2
-rw-r--r--tests/roots/test-intl/footnote.po2
-rw-r--r--tests/roots/test-intl/glossary_terms.po2
-rw-r--r--tests/roots/test-intl/glossary_terms_inconsistency.po2
-rw-r--r--tests/roots/test-intl/i18n.pngbin67861 -> 67765 bytes
-rw-r--r--tests/roots/test-intl/index_entries.po2
-rw-r--r--tests/roots/test-intl/literalblock.po2
-rw-r--r--tests/roots/test-intl/refs_inconsistency.po2
-rw-r--r--tests/roots/test-intl/refs_python_domain.txt30
-rw-r--r--tests/roots/test-intl/role_xref.po2
-rw-r--r--tests/roots/test-intl/rubric.po2
-rw-r--r--tests/roots/test-intl/seealso.po2
-rw-r--r--tests/roots/test-intl/sphinx.po2
-rw-r--r--tests/roots/test-intl/subdir/contents.txt4
-rw-r--r--tests/roots/test-intl/versionchange.po2
-rw-r--r--tests/roots/test-intl/warnings.po2
-rw-r--r--tests/roots/test-numbered-circular/conf.py0
-rw-r--r--tests/roots/test-numbered-circular/contents.rst5
-rw-r--r--tests/roots/test-numbered-circular/sub.rst3
-rw-r--r--tests/roots/test-numfig/bar.rst58
-rw-r--r--tests/roots/test-numfig/baz.rst22
-rw-r--r--tests/roots/test-numfig/conf.py3
-rw-r--r--tests/roots/test-numfig/foo.rst71
-rw-r--r--tests/roots/test-numfig/index.rst50
-rw-r--r--tests/roots/test-numfig/rimg.pngbin0 -> 218 bytes
-rw-r--r--tests/roots/test-only-directive/conf.py2
-rw-r--r--tests/roots/test-setup/doc/contents.txt10
-rw-r--r--tests/roots/test-templating/autosummary_templating.txt8
-rw-r--r--tests/roots/test-tocdepth/bar.rst27
-rw-r--r--tests/roots/test-tocdepth/baz.rst5
-rw-r--r--tests/roots/test-tocdepth/conf.py3
-rw-r--r--tests/roots/test-tocdepth/foo.rst26
-rw-r--r--tests/roots/test-tocdepth/index.rst8
-rw-r--r--tests/roots/test-versioning/added.txt20
-rw-r--r--tests/roots/test-versioning/conf.py3
-rw-r--r--tests/roots/test-versioning/deleted.txt12
-rw-r--r--tests/roots/test-versioning/deleted_end.txt11
-rw-r--r--tests/roots/test-versioning/index.txt13
-rw-r--r--tests/roots/test-versioning/insert.txt18
-rw-r--r--tests/roots/test-versioning/insert_beginning.txt18
-rw-r--r--tests/roots/test-versioning/insert_similar.txt17
-rw-r--r--tests/roots/test-versioning/modified.txt17
-rw-r--r--tests/roots/test-versioning/original.txt15
87 files changed, 1246 insertions, 65 deletions
diff --git a/tests/roots/test-api-set-translator/conf.py b/tests/roots/test-api-set-translator/conf.py
new file mode 100644
index 00000000..3c160664
--- /dev/null
+++ b/tests/roots/test-api-set-translator/conf.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+## set this by test
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+from sphinx.writers.html import HTMLTranslator
+from sphinx.writers.latex import LaTeXTranslator
+from sphinx.writers.manpage import ManualPageTranslator
+from sphinx.writers.texinfo import TexinfoTranslator
+from sphinx.writers.text import TextTranslator
+from sphinx.writers.websupport import WebSupportTranslator
+from docutils.writers.docutils_xml import XMLTranslator
+
+
+project = 'test'
+master_doc = 'index'
+
+
+class ConfHTMLTranslator(HTMLTranslator):
+ pass
+
+
+class ConfDirHTMLTranslator(HTMLTranslator):
+ pass
+
+
+class ConfSingleHTMLTranslator(HTMLTranslator):
+ pass
+
+
+class ConfPickleTranslator(HTMLTranslator):
+ pass
+
+
+class ConfJsonTranslator(HTMLTranslator):
+ pass
+
+
+class ConfLaTeXTranslator(LaTeXTranslator):
+ pass
+
+
+class ConfManualPageTranslator(ManualPageTranslator):
+ pass
+
+
+class ConfTexinfoTranslator(TexinfoTranslator):
+ pass
+
+
+class ConfTextTranslator(TextTranslator):
+ pass
+
+
+class ConfWebSupportTranslator(WebSupportTranslator):
+ pass
+
+
+class ConfXMLTranslator(XMLTranslator):
+ pass
+
+
+class ConfPseudoXMLTranslator(XMLTranslator):
+ pass
+
+
+def setup(app):
+ app.set_translator('html', ConfHTMLTranslator)
+ app.set_translator('dirhtml', ConfDirHTMLTranslator)
+ app.set_translator('singlehtml', ConfSingleHTMLTranslator)
+ app.set_translator('pickle', ConfPickleTranslator)
+ app.set_translator('json', ConfJsonTranslator)
+ app.set_translator('latex', ConfLaTeXTranslator)
+ app.set_translator('man', ConfManualPageTranslator)
+ app.set_translator('texinfo', ConfTexinfoTranslator)
+ app.set_translator('text', ConfTextTranslator)
+ app.set_translator('websupport', ConfWebSupportTranslator)
+ app.set_translator('xml', ConfXMLTranslator)
+ app.set_translator('pseudoxml', ConfPseudoXMLTranslator)
diff --git a/tests/roots/test-api-set-translator/index.rst b/tests/roots/test-api-set-translator/index.rst
new file mode 100644
index 00000000..e5a29cf2
--- /dev/null
+++ b/tests/roots/test-api-set-translator/index.rst
@@ -0,0 +1,3 @@
+=======================
+Test API set_translator
+======================= \ No newline at end of file
diff --git a/tests/roots/test-api-set-translator/nonext/conf.py b/tests/roots/test-api-set-translator/nonext/conf.py
new file mode 100644
index 00000000..5a92f736
--- /dev/null
+++ b/tests/roots/test-api-set-translator/nonext/conf.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+
+sys.path.insert(0, os.path.dirname(os.path.abspath('.')))
+
+project = 'test'
+master_doc = 'index'
diff --git a/tests/roots/test-api-set-translator/translator.py b/tests/roots/test-api-set-translator/translator.py
new file mode 100644
index 00000000..015b4aa2
--- /dev/null
+++ b/tests/roots/test-api-set-translator/translator.py
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+
+from sphinx.writers.html import HTMLTranslator
+
+class ExtHTMLTranslator(HTMLTranslator):
+ pass
diff --git a/tests/roots/test-autosummary/conf.py b/tests/roots/test-autosummary/conf.py
index 542696e9..d9a44748 100644
--- a/tests/roots/test-autosummary/conf.py
+++ b/tests/roots/test-autosummary/conf.py
@@ -1,3 +1,7 @@
+import sys, os
+
+sys.path.insert(0, os.path.abspath('.'))
+
extensions = ['sphinx.ext.autosummary']
# The suffix of source filenames.
diff --git a/tests/roots/test-autosummary/contents.rst b/tests/roots/test-autosummary/contents.rst
index 3f16af99..cd4b7c5e 100644
--- a/tests/roots/test-autosummary/contents.rst
+++ b/tests/roots/test-autosummary/contents.rst
@@ -2,5 +2,6 @@
.. autosummary::
:nosignatures:
:toctree:
-
+
dummy_module
+ sphinx
diff --git a/tests/roots/test-autosummary/sphinx.rst b/tests/roots/test-autosummary/sphinx.rst
new file mode 100644
index 00000000..fc1a35a0
--- /dev/null
+++ b/tests/roots/test-autosummary/sphinx.rst
@@ -0,0 +1,31 @@
+Autosummary test
+================
+
+.. autosummary::
+ :toctree: generated
+
+ sphinx.application.Sphinx
+
+.. currentmodule:: sphinx.application
+
+.. autoclass:: TemplateBridge
+
+ Basic test
+
+ .. autosummary::
+
+ render -- some ignored stuff goes here
+ render_string More ignored stuff
+
+ Test with tildes
+
+ .. autosummary::
+
+ ~TemplateBridge.render
+ ~TemplateBridge.render_string
+
+ Methods:
+
+ .. automethod:: render
+
+ .. automethod:: render_string
diff --git a/tests/roots/test-build-text/conf.py b/tests/roots/test-build-text/conf.py
new file mode 100644
index 00000000..1ba342a6
--- /dev/null
+++ b/tests/roots/test-build-text/conf.py
@@ -0,0 +1,2 @@
+master_doc = 'contents'
+source_suffix = '.txt'
diff --git a/tests/roots/test-build-text/contents.txt b/tests/roots/test-build-text/contents.txt
new file mode 100644
index 00000000..420d1428
--- /dev/null
+++ b/tests/roots/test-build-text/contents.txt
@@ -0,0 +1,8 @@
+.. toctree::
+
+ maxwidth
+ lineblock
+ nonascii_title
+ nonascii_table
+ nonascii_maxwidth
+ table
diff --git a/tests/roots/test-build-text/lineblock.txt b/tests/roots/test-build-text/lineblock.txt
new file mode 100644
index 00000000..b9cd0ed7
--- /dev/null
+++ b/tests/roots/test-build-text/lineblock.txt
@@ -0,0 +1,6 @@
+* one
+
+ | line-block 1
+ | line-block 2
+
+followed paragraph.
diff --git a/tests/roots/test-build-text/maxwidth.txt b/tests/roots/test-build-text/maxwidth.txt
new file mode 100644
index 00000000..c36f8a02
--- /dev/null
+++ b/tests/roots/test-build-text/maxwidth.txt
@@ -0,0 +1,6 @@
+.. seealso:: ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham
+
+* ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham
+* ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham ham
+
+spam egg
diff --git a/tests/roots/test-build-text/nonascii_maxwidth.txt b/tests/roots/test-build-text/nonascii_maxwidth.txt
new file mode 100644
index 00000000..e9f0fd9b
--- /dev/null
+++ b/tests/roots/test-build-text/nonascii_maxwidth.txt
@@ -0,0 +1,5 @@
+abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc
+
+日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語 日本語
+
+abc 日本語 abc 日本語 abc 日本語 abc 日本語 abc 日本語 abc 日本語 abc 日本語 abc 日本語 abc 日本語 abc 日本語 abc 日本語
diff --git a/tests/roots/test-build-text/nonascii_table.txt b/tests/roots/test-build-text/nonascii_table.txt
new file mode 100644
index 00000000..709e0f2f
--- /dev/null
+++ b/tests/roots/test-build-text/nonascii_table.txt
@@ -0,0 +1,7 @@
+.. list-table::
+
+ - - spam
+ - egg
+
+ - - 日本語
+ - 日本語
diff --git a/tests/roots/test-build-text/nonascii_title.txt b/tests/roots/test-build-text/nonascii_title.txt
new file mode 100644
index 00000000..6d3b1f61
--- /dev/null
+++ b/tests/roots/test-build-text/nonascii_title.txt
@@ -0,0 +1,2 @@
+日本語
+======
diff --git a/tests/roots/test-build-text/table.txt b/tests/roots/test-build-text/table.txt
new file mode 100644
index 00000000..84328940
--- /dev/null
+++ b/tests/roots/test-build-text/table.txt
@@ -0,0 +1,7 @@
+ +-----+-----+
+ | XXX | XXX |
+ +-----+-----+
+ | | XXX |
+ +-----+-----+
+ | XXX | |
+ +-----+-----+
diff --git a/tests/roots/test-circular/conf.py b/tests/roots/test-circular/conf.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/roots/test-circular/conf.py
diff --git a/tests/roots/test-circular/contents.rst b/tests/roots/test-circular/contents.rst
new file mode 100644
index 00000000..294e674d
--- /dev/null
+++ b/tests/roots/test-circular/contents.rst
@@ -0,0 +1,4 @@
+.. toctree::
+
+ sub
+
diff --git a/tests/roots/test-circular/sub.rst b/tests/roots/test-circular/sub.rst
new file mode 100644
index 00000000..070c3974
--- /dev/null
+++ b/tests/roots/test-circular/sub.rst
@@ -0,0 +1,3 @@
+.. toctree::
+
+ contents
diff --git a/tests/roots/test-directive-code/caption.rst b/tests/roots/test-directive-code/caption.rst
new file mode 100644
index 00000000..5a2fe4a1
--- /dev/null
+++ b/tests/roots/test-directive-code/caption.rst
@@ -0,0 +1,21 @@
+Dedent
+======
+
+Code blocks
+-----------
+
+.. code-block:: ruby
+ :caption: caption *test* rb
+
+ def ruby?
+ false
+ end
+
+
+Literal Include
+---------------
+
+.. literalinclude:: literal.inc
+ :language: python
+ :caption: caption **test** py
+ :lines: 10-11
diff --git a/tests/roots/test-directive-code/conf.py b/tests/roots/test-directive-code/conf.py
new file mode 100644
index 00000000..f81c30bc
--- /dev/null
+++ b/tests/roots/test-directive-code/conf.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+master_doc = 'index'
diff --git a/tests/roots/test-directive-code/dedent.rst b/tests/roots/test-directive-code/dedent.rst
new file mode 100644
index 00000000..9ec1c0ee
--- /dev/null
+++ b/tests/roots/test-directive-code/dedent.rst
@@ -0,0 +1,35 @@
+Dedent
+======
+
+Literal Include
+---------------
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lines: 10-11
+ :dedent: 0
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lines: 10-11
+ :dedent: 1
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lines: 10-11
+ :dedent: 2
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lines: 10-11
+ :dedent: 3
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lines: 10-11
+ :dedent: 4
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lines: 10-11
+ :dedent: 1000
diff --git a/tests/roots/test-directive-code/dedent_code.rst b/tests/roots/test-directive-code/dedent_code.rst
new file mode 100644
index 00000000..3e8dacd6
--- /dev/null
+++ b/tests/roots/test-directive-code/dedent_code.rst
@@ -0,0 +1,53 @@
+Dedent
+======
+
+Code blocks
+-----------
+
+.. code-block:: ruby
+ :linenos:
+ :dedent: 0
+
+ def ruby?
+ false
+ end
+
+.. code-block:: ruby
+ :linenos:
+ :dedent: 1
+
+ def ruby?
+ false
+ end
+
+.. code-block:: ruby
+ :linenos:
+ :dedent: 2
+
+ def ruby?
+ false
+ end
+
+.. code-block:: ruby
+ :linenos:
+ :dedent: 3
+
+ def ruby?
+ false
+ end
+
+.. code-block:: ruby
+ :linenos:
+ :dedent: 4
+
+ def ruby?
+ false
+ end
+
+.. code-block:: ruby
+ :linenos:
+ :dedent: 1000
+
+ def ruby?
+ false
+ end
diff --git a/tests/roots/test-directive-code/index.rst b/tests/roots/test-directive-code/index.rst
new file mode 100644
index 00000000..dab6b708
--- /dev/null
+++ b/tests/roots/test-directive-code/index.rst
@@ -0,0 +1,25 @@
+test-directive-code
+===================
+
+.. toctree::
+ :glob:
+
+ *
+
+
+Code blocks
+-----------
+
+.. code-block:: ruby
+ :linenos:
+
+ def ruby?
+ false
+ end
+
+
+Literal Includes
+----------------
+
+.. literalinclude:: literal.inc
+ :language: python
diff --git a/tests/roots/test-directive-code/lineno_match.rst b/tests/roots/test-directive-code/lineno_match.rst
new file mode 100644
index 00000000..4e3b3835
--- /dev/null
+++ b/tests/roots/test-directive-code/lineno_match.rst
@@ -0,0 +1,17 @@
+Literal Includes with Line Numbers Matching
+===========================================
+
+.. literalinclude:: literal.inc
+ :language: python
+ :pyobject: Bar
+ :lineno-match:
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lines: 5-6,7,8-9
+ :lineno-match:
+
+.. literalinclude:: literal.inc
+ :language: python
+ :start-after: pass
+ :lineno-match:
diff --git a/tests/roots/test-directive-code/lineno_start.rst b/tests/roots/test-directive-code/lineno_start.rst
new file mode 100644
index 00000000..1beaabbf
--- /dev/null
+++ b/tests/roots/test-directive-code/lineno_start.rst
@@ -0,0 +1,6 @@
+Literal Includes with Line Numbers Starting from 200
+====================================================
+
+.. literalinclude:: literal.inc
+ :language: python
+ :lineno-start: 200
diff --git a/tests/roots/test-directive-code/linenos.rst b/tests/roots/test-directive-code/linenos.rst
new file mode 100644
index 00000000..2f64498d
--- /dev/null
+++ b/tests/roots/test-directive-code/linenos.rst
@@ -0,0 +1,6 @@
+Literal Includes with Line Numbers
+==================================
+
+.. literalinclude:: literal.inc
+ :language: python
+ :linenos:
diff --git a/tests/roots/test-directive-code/literal.inc b/tests/roots/test-directive-code/literal.inc
new file mode 100644
index 00000000..694f15ed
--- /dev/null
+++ b/tests/roots/test-directive-code/literal.inc
@@ -0,0 +1,13 @@
+# Literally included file using Python highlighting
+# -*- coding: utf-8 -*-
+
+foo = "Including Unicode characters: üöä"
+
+class Foo:
+ pass
+
+class Bar:
+ def baz():
+ pass
+
+def bar(): pass
diff --git a/tests/roots/test-directive-only/conf.py b/tests/roots/test-directive-only/conf.py
new file mode 100644
index 00000000..eb3a3d0d
--- /dev/null
+++ b/tests/roots/test-directive-only/conf.py
@@ -0,0 +1,2 @@
+
+project = 'test-directive-only'
diff --git a/tests/roots/test-only-directive/contents.rst b/tests/roots/test-directive-only/contents.rst
index 9a93be9e..80ec0031 100644
--- a/tests/roots/test-only-directive/contents.rst
+++ b/tests/roots/test-directive-only/contents.rst
@@ -1,4 +1,4 @@
-test-only-directive
+test-directive-only
===================
.. toctree::
diff --git a/tests/roots/test-only-directive/only.rst b/tests/roots/test-directive-only/only.rst
index 4a3eb48a..4a3eb48a 100644
--- a/tests/roots/test-only-directive/only.rst
+++ b/tests/roots/test-directive-only/only.rst
diff --git a/tests/roots/test-doctest/conf.py b/tests/roots/test-doctest/conf.py
new file mode 100644
index 00000000..f6a12edb
--- /dev/null
+++ b/tests/roots/test-doctest/conf.py
@@ -0,0 +1,5 @@
+extensions = ['sphinx.ext.doctest']
+
+project = 'test project for doctest'
+master_doc = 'doctest.txt'
+source_suffix = '.txt'
diff --git a/tests/roots/test-doctest/doctest.txt b/tests/roots/test-doctest/doctest.txt
new file mode 100644
index 00000000..ce4d88bd
--- /dev/null
+++ b/tests/roots/test-doctest/doctest.txt
@@ -0,0 +1,129 @@
+Testing the doctest extension
+=============================
+
+Simple doctest blocks
+---------------------
+
+>>> 1+1
+2
+>>> 1/0
+Traceback (most recent call last):
+ ...
+ZeroDivisionError: integer division or modulo by zero
+
+
+Special directives
+------------------
+
+* doctest
+
+ .. doctest::
+
+ >>> 1+1
+ 2
+ >>> 1/0
+ Traceback (most recent call last):
+ ...
+ ZeroDivisionError: integer division or modulo by zero
+
+* testcode/testoutput
+
+ .. testcode::
+
+ print(1+1)
+
+ .. testoutput::
+
+ 2
+
+ .. testcode::
+
+ 1/0
+
+ .. testoutput::
+
+ Traceback (most recent call last):
+ ...
+ ZeroDivisionError: integer division or modulo by zero
+
+* testsetup
+
+ .. testsetup:: *
+
+ def squared(x):
+ return x * x
+
+ .. doctest::
+
+ >>> squared(2)
+ 4
+
+ .. testcode::
+
+ print(squared(2))
+
+ .. testoutput::
+
+ 4
+
+ >>> squared(2)
+ 4
+
+* options for testcode/testoutput blocks
+
+ .. testcode::
+ :hide:
+
+ print('Output text.')
+
+ .. testoutput::
+ :hide:
+ :options: +NORMALIZE_WHITESPACE
+
+ Output text.
+
+* grouping
+
+ .. testsetup:: group1
+
+ def add(x, y):
+ return x + y
+
+
+ ``add`` is now known in "group1", but not in others.
+
+ .. doctest:: group1
+
+ >>> add(1, 1)
+ 2
+
+ .. doctest:: group2
+
+ >>> add(1, 1)
+ Traceback (most recent call last):
+ ...
+ NameError: name 'add' is not defined
+
+ Interleaving testcode/testoutput:
+
+ .. testcode:: group1
+
+ print(squared(3))
+
+ .. testcode:: group2
+
+ print(squared(4))
+
+ .. testoutput:: group1
+
+ 9
+
+ .. testoutput:: group2
+
+ 16
+
+
+.. testcleanup:: *
+
+ import test_ext_doctest
+ test_ext_doctest.cleanup_call()
diff --git a/tests/roots/test-docutilsconf/contents.txt b/tests/roots/test-docutilsconf/contents.txt
index 3d0003b8..b20204e6 100644
--- a/tests/roots/test-docutilsconf/contents.txt
+++ b/tests/roots/test-docutilsconf/contents.txt
@@ -1,15 +1,15 @@
-docutils conf
-=============
-
-field-name-limit
-----------------
-
-:short: desc
-:long long long long: long title
-
-option-limit
-------------
-
---short short desc
---long-long-long-long long desc
-
+docutils conf
+=============
+
+field-name-limit
+----------------
+
+:short: desc
+:long long long long: long title
+
+option-limit
+------------
+
+--short short desc
+--long-long-long-long long desc
+
diff --git a/tests/roots/test-ext-viewcode/conf.py b/tests/roots/test-ext-viewcode/conf.py
new file mode 100644
index 00000000..a99a72bb
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/conf.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+
+import sys
+import os
+
+sys.path.insert(0, os.path.abspath('.'))
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
+master_doc = 'index'
+
+
+if 'test_linkcode' in tags:
+ extensions.remove('sphinx.ext.viewcode')
+ extensions.append('sphinx.ext.linkcode')
+
+ def linkcode_resolve(domain, info):
+ if domain == 'py':
+ fn = info['module'].replace('.', '/')
+ return "http://foobar/source/%s.py" % fn
+ elif domain == "js":
+ return "http://foobar/js/" + info['fullname']
+ elif domain in ("c", "cpp"):
+ return "http://foobar/%s/%s" % (domain, "".join(info['names']))
+ else:
+ raise AssertionError()
diff --git a/tests/roots/test-ext-viewcode/index.rst b/tests/roots/test-ext-viewcode/index.rst
new file mode 100644
index 00000000..b5776cfa
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/index.rst
@@ -0,0 +1,34 @@
+viewcode
+========
+
+.. py:module:: spam
+
+.. autofunction:: func1
+
+.. autofunction:: func2
+
+.. autofunction:: spam.mod1.func1
+
+.. autofunction:: spam.mod2.func2
+
+.. autofunction:: Class1
+
+.. autofunction:: Class2
+
+.. autofunction:: spam.mod1.Class1
+
+.. autofunction:: spam.mod2.Class2
+
+
+.. literalinclude:: spam/__init__.py
+ :language: python
+ :pyobject: func1
+
+.. literalinclude:: spam/mod1.py
+ :language: python
+ :pyobject: func1
+
+
+.. toctree::
+
+ objects
diff --git a/tests/roots/test-ext-viewcode/objects.rst b/tests/roots/test-ext-viewcode/objects.rst
new file mode 100644
index 00000000..8d304bec
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/objects.rst
@@ -0,0 +1,169 @@
+Testing object descriptions
+===========================
+
+.. function:: func_without_module(a, b, *c[, d])
+
+ Does something.
+
+.. function:: func_without_body()
+
+.. function:: func_noindex
+ :noindex:
+
+.. function:: func_with_module
+ :module: foolib
+
+Referring to :func:`func with no index <func_noindex>`.
+Referring to :func:`nothing <>`.
+
+.. module:: mod
+ :synopsis: Module synopsis.
+ :platform: UNIX
+
+.. function:: func_in_module
+
+.. class:: Cls
+
+ .. method:: meth1
+
+ .. staticmethod:: meths
+
+ .. attribute:: attr
+
+.. explicit class given
+.. method:: Cls.meth2
+
+.. explicit module given
+.. exception:: Error(arg1, arg2)
+ :module: errmod
+
+.. data:: var
+
+
+.. currentmodule:: None
+
+.. function:: func_without_module2() -> annotation
+
+.. object:: long(parameter, \
+ list)
+ another one
+
+.. class:: TimeInt
+
+ Has only one parameter (triggers special behavior...)
+
+ :param moo: |test|
+ :type moo: |test|
+
+.. |test| replace:: Moo
+
+.. class:: Time(hour, minute, isdst)
+
+ :param year: The year.
+ :type year: TimeInt
+ :param TimeInt minute: The minute.
+ :param isdst: whether it's DST
+ :type isdst: * some complex
+ * expression
+ :returns: a new :class:`Time` instance
+ :rtype: :class:`Time`
+ :raises ValueError: if the values are out of range
+ :ivar int hour: like *hour*
+ :ivar minute: like *minute*
+ :vartype minute: int
+ :param hour: Some parameter
+ :type hour: DuplicateType
+ :param hour: Duplicate param. Should not lead to crashes.
+ :type hour: DuplicateType
+ :param .Cls extcls: A class from another module.
+
+
+C items
+=======
+
+.. c:function:: Sphinx_DoSomething()
+
+.. c:member:: SphinxStruct.member
+
+.. c:macro:: SPHINX_USE_PYTHON
+
+.. c:type:: SphinxType
+
+.. c:var:: sphinx_global
+
+
+Javascript items
+================
+
+.. js:function:: foo()
+
+.. js:data:: bar
+
+.. documenting the method of any object
+.. js:function:: bar.baz(href, callback[, errback])
+
+ :param string href: The location of the resource.
+ :param callback: Get's called with the data returned by the resource.
+ :throws InvalidHref: If the `href` is invalid.
+ :returns: `undefined`
+
+.. js:attribute:: bar.spam
+
+References
+==========
+
+Referencing :class:`mod.Cls` or :Class:`mod.Cls` should be the same.
+
+With target: :c:func:`Sphinx_DoSomething()` (parentheses are handled),
+:c:member:`SphinxStruct.member`, :c:macro:`SPHINX_USE_PYTHON`,
+:c:type:`SphinxType *` (pointer is handled), :c:data:`sphinx_global`.
+
+Without target: :c:func:`CFunction`. :c:func:`!malloc`.
+
+:js:func:`foo()`
+:js:func:`foo`
+
+:js:data:`bar`
+:js:func:`bar.baz()`
+:js:func:`bar.baz`
+:js:func:`~bar.baz()`
+
+:js:attr:`bar.baz`
+
+
+Others
+======
+
+.. envvar:: HOME
+
+.. program:: python
+
+.. cmdoption:: -c command
+
+.. program:: perl
+
+.. cmdoption:: -c
+
+.. option:: +p
+
+Link to :option:`perl +p`.
+
+
+User markup
+===========
+
+.. userdesc:: myobj:parameter
+
+ Description of userdesc.
+
+
+Referencing :userdescrole:`myobj`.
+
+
+CPP domain
+==========
+
+.. cpp:class:: n::Array<T,d>
+
+ .. cpp:function:: T& operator[]( unsigned j )
+ const T& operator[]( unsigned j ) const
diff --git a/tests/roots/test-ext-viewcode/spam/__init__.py b/tests/roots/test-ext-viewcode/spam/__init__.py
new file mode 100644
index 00000000..2c8603c1
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/spam/__init__.py
@@ -0,0 +1,7 @@
+from __future__ import absolute_import
+
+from .mod1 import func1, Class1
+from .mod2 import (
+ func2,
+ Class2,
+)
diff --git a/tests/roots/test-ext-viewcode/spam/mod1.py b/tests/roots/test-ext-viewcode/spam/mod1.py
new file mode 100644
index 00000000..7133fc82
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/spam/mod1.py
@@ -0,0 +1,15 @@
+"""
+mod1
+"""
+
+def func1(a, b):
+ """
+ this is func1
+ """
+ return a, b
+
+
+class Class1(object):
+ """
+ this is Class1
+ """
diff --git a/tests/roots/test-ext-viewcode/spam/mod2.py b/tests/roots/test-ext-viewcode/spam/mod2.py
new file mode 100644
index 00000000..79834b66
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/spam/mod2.py
@@ -0,0 +1,15 @@
+"""
+mod2
+"""
+
+def func2(a, b):
+ """
+ this is func2
+ """
+ return a, b
+
+
+class Class2(object):
+ """
+ this is Class2
+ """
diff --git a/tests/roots/test-intl/admonitions.po b/tests/roots/test-intl/admonitions.po
index 0dd16376..bc722e58 100644
--- a/tests/roots/test-intl/admonitions.po
+++ b/tests/roots/test-intl/admonitions.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-07-03 12:00\n"
+"POT-Creation-Date: 2013-07-03 12:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/conf.py b/tests/roots/test-intl/conf.py
index 4c37f771..1b20244c 100644
--- a/tests/roots/test-intl/conf.py
+++ b/tests/roots/test-intl/conf.py
@@ -6,3 +6,4 @@ keep_warnings = True
templates_path = ['_templates']
html_additional_pages = {'index': 'index.html'}
release = version = '2013.120'
+gettext_enables = ['index']
diff --git a/tests/roots/test-intl/definition_terms.po b/tests/roots/test-intl/definition_terms.po
index 2c3a3bca..a147fe5e 100644
--- a/tests/roots/test-intl/definition_terms.po
+++ b/tests/roots/test-intl/definition_terms.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-01 05:00\n"
+"POT-Creation-Date: 2013-01-01 05:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/docfields.po b/tests/roots/test-intl/docfields.po
index f906ca19..8c3b8f97 100644
--- a/tests/roots/test-intl/docfields.po
+++ b/tests/roots/test-intl/docfields.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Sphinx <Tests> 0.6\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-16 14:11\n"
+"POT-Creation-Date: 2012-12-16 14:11+0000\n"
"PO-Revision-Date: 2012-12-18 06:14+0900\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/external_links.po b/tests/roots/test-intl/external_links.po
index e4e67643..8c53abbd 100644
--- a/tests/roots/test-intl/external_links.po
+++ b/tests/roots/test-intl/external_links.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-22 08:28\n"
+"POT-Creation-Date: 2012-11-22 08:28+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/figure_caption.po b/tests/roots/test-intl/figure_caption.po
index 2b85aea3..2fb1e5a5 100644
--- a/tests/roots/test-intl/figure_caption.po
+++ b/tests/roots/test-intl/figure_caption.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-04 7:00\n"
+"POT-Creation-Date: 2013-01-04 07:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/footnote.po b/tests/roots/test-intl/footnote.po
index b3876f51..3dfd3587 100644
--- a/tests/roots/test-intl/footnote.po
+++ b/tests/roots/test-intl/footnote.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-22 08:28\n"
+"POT-Creation-Date: 2012-11-22 08:28+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/glossary_terms.po b/tests/roots/test-intl/glossary_terms.po
index 1ffcaeb2..2746655e 100644
--- a/tests/roots/test-intl/glossary_terms.po
+++ b/tests/roots/test-intl/glossary_terms.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-29 14:10\n"
+"POT-Creation-Date: 2013-01-29 14:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/glossary_terms_inconsistency.po b/tests/roots/test-intl/glossary_terms_inconsistency.po
index 5e301657..ef2bf30f 100644
--- a/tests/roots/test-intl/glossary_terms_inconsistency.po
+++ b/tests/roots/test-intl/glossary_terms_inconsistency.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-29 14:10\n"
+"POT-Creation-Date: 2013-01-29 14:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/i18n.png b/tests/roots/test-intl/i18n.png
index 72c12d13..4c8f8992 100644
--- a/tests/roots/test-intl/i18n.png
+++ b/tests/roots/test-intl/i18n.png
Binary files differ
diff --git a/tests/roots/test-intl/index_entries.po b/tests/roots/test-intl/index_entries.po
index 6da9a813..83619b49 100644
--- a/tests/roots/test-intl/index_entries.po
+++ b/tests/roots/test-intl/index_entries.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: foo foo\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-05 18:10\n"
+"POT-Creation-Date: 2013-01-05 18:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/literalblock.po b/tests/roots/test-intl/literalblock.po
index 8ea83b3b..5b5f71e0 100644
--- a/tests/roots/test-intl/literalblock.po
+++ b/tests/roots/test-intl/literalblock.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-22 08:28\n"
+"POT-Creation-Date: 2012-11-22 08:28+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/refs_inconsistency.po b/tests/roots/test-intl/refs_inconsistency.po
index 9cab687f..cb2de9ad 100644
--- a/tests/roots/test-intl/refs_inconsistency.po
+++ b/tests/roots/test-intl/refs_inconsistency.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-05 08:28\n"
+"POT-Creation-Date: 2012-12-05 08:28+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/refs_python_domain.txt b/tests/roots/test-intl/refs_python_domain.txt
index 20a8bc50..2b021f2e 100644
--- a/tests/roots/test-intl/refs_python_domain.txt
+++ b/tests/roots/test-intl/refs_python_domain.txt
@@ -1,15 +1,15 @@
-:tocdepth: 2
-
-i18n with python domain refs
-=============================
-
-.. currentmodule:: sensitive
-
-See this decorator: :func:`sensitive_variables`.
-
-.. function:: sensitive_variables(*variables)
-
- Some description
-
-.. currentmodule:: reporting
-
+:tocdepth: 2
+
+i18n with python domain refs
+=============================
+
+.. currentmodule:: sensitive
+
+See this decorator: :func:`sensitive_variables`.
+
+.. function:: sensitive_variables(*variables)
+
+ Some description
+
+.. currentmodule:: reporting
+
diff --git a/tests/roots/test-intl/role_xref.po b/tests/roots/test-intl/role_xref.po
index 8730c499..5b6d114c 100644
--- a/tests/roots/test-intl/role_xref.po
+++ b/tests/roots/test-intl/role_xref.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-04 14:00\n"
+"POT-Creation-Date: 2013-02-04 14:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/rubric.po b/tests/roots/test-intl/rubric.po
index 2c1214b7..91376236 100644
--- a/tests/roots/test-intl/rubric.po
+++ b/tests/roots/test-intl/rubric.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-12 7:00\n"
+"POT-Creation-Date: 2013-11-12 07:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/seealso.po b/tests/roots/test-intl/seealso.po
index d3b27e51..86a1c73c 100644
--- a/tests/roots/test-intl/seealso.po
+++ b/tests/roots/test-intl/seealso.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Sphinx <Tests> 0.6\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-16 06:06\n"
+"POT-Creation-Date: 2012-12-16 06:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/sphinx.po b/tests/roots/test-intl/sphinx.po
index cac5d4ad..a236f2f1 100644
--- a/tests/roots/test-intl/sphinx.po
+++ b/tests/roots/test-intl/sphinx.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-22 08:28\n"
+"POT-Creation-Date: 2012-11-22 08:28+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/subdir/contents.txt b/tests/roots/test-intl/subdir/contents.txt
index b6509baf..7578ce38 100644
--- a/tests/roots/test-intl/subdir/contents.txt
+++ b/tests/roots/test-intl/subdir/contents.txt
@@ -1,2 +1,2 @@
-subdir contents
-===============
+subdir contents
+===============
diff --git a/tests/roots/test-intl/versionchange.po b/tests/roots/test-intl/versionchange.po
index 911d3d9f..5a8df380 100644
--- a/tests/roots/test-intl/versionchange.po
+++ b/tests/roots/test-intl/versionchange.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-15 03:17\n"
+"POT-Creation-Date: 2012-12-15 03:17+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-intl/warnings.po b/tests/roots/test-intl/warnings.po
index bf82510e..7963a0a8 100644
--- a/tests/roots/test-intl/warnings.po
+++ b/tests/roots/test-intl/warnings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Sphinx <Tests> 0.6\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-04 13:06\n"
+"POT-Creation-Date: 2013-02-04 13:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/roots/test-numbered-circular/conf.py b/tests/roots/test-numbered-circular/conf.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/roots/test-numbered-circular/conf.py
diff --git a/tests/roots/test-numbered-circular/contents.rst b/tests/roots/test-numbered-circular/contents.rst
new file mode 100644
index 00000000..c3129cd4
--- /dev/null
+++ b/tests/roots/test-numbered-circular/contents.rst
@@ -0,0 +1,5 @@
+.. toctree::
+ :numbered:
+
+ sub
+
diff --git a/tests/roots/test-numbered-circular/sub.rst b/tests/roots/test-numbered-circular/sub.rst
new file mode 100644
index 00000000..070c3974
--- /dev/null
+++ b/tests/roots/test-numbered-circular/sub.rst
@@ -0,0 +1,3 @@
+.. toctree::
+
+ contents
diff --git a/tests/roots/test-numfig/bar.rst b/tests/roots/test-numfig/bar.rst
new file mode 100644
index 00000000..f86e7475
--- /dev/null
+++ b/tests/roots/test-numfig/bar.rst
@@ -0,0 +1,58 @@
+===
+Bar
+===
+
+Bar A
+=====
+
+.. figure:: rimg.png
+
+ should be Fig.2.1
+
+.. csv-table:: should be Table 2.1
+ :header-rows: 0
+
+ hello,world
+
+.. code-block:: python
+ :caption: should be List 2.1
+
+ print('hello world')
+
+.. toctree::
+
+ baz
+
+.. figure:: rimg.png
+
+ should be Fig.2.3
+
+.. csv-table:: should be Table 2.3
+ :header-rows: 0
+
+ hello,world
+
+.. code-block:: python
+ :caption: should be List 2.3
+
+ print('hello world')
+
+Bar B
+=====
+
+Bar B1
+------
+
+.. figure:: rimg.png
+
+ should be Fig.2.4
+
+.. csv-table:: should be Table 2.4
+ :header-rows: 0
+
+ hello,world
+
+.. code-block:: python
+ :caption: should be List 2.4
+
+ print('hello world')
diff --git a/tests/roots/test-numfig/baz.rst b/tests/roots/test-numfig/baz.rst
new file mode 100644
index 00000000..da9e0fe0
--- /dev/null
+++ b/tests/roots/test-numfig/baz.rst
@@ -0,0 +1,22 @@
+Baz A
+-----
+
+.. _fig22:
+
+.. figure:: rimg.png
+
+ should be Fig.2.2
+
+.. _table22:
+
+.. csv-table:: should be Table 2.2
+ :header-rows: 0
+
+ hello,world
+
+.. _code22:
+
+.. code-block:: python
+ :caption: should be List 2.2
+
+ print('hello world')
diff --git a/tests/roots/test-numfig/conf.py b/tests/roots/test-numfig/conf.py
new file mode 100644
index 00000000..f81c30bc
--- /dev/null
+++ b/tests/roots/test-numfig/conf.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+master_doc = 'index'
diff --git a/tests/roots/test-numfig/foo.rst b/tests/roots/test-numfig/foo.rst
new file mode 100644
index 00000000..ef713574
--- /dev/null
+++ b/tests/roots/test-numfig/foo.rst
@@ -0,0 +1,71 @@
+===
+Foo
+===
+
+.. figure:: rimg.png
+
+ should be Fig.1.1
+
+.. csv-table:: should be Table 1.1
+ :header-rows: 0
+
+ hello,world
+
+.. code-block:: python
+ :caption: should be List 1.1
+
+ print('hello world')
+
+Foo A
+=====
+
+.. figure:: rimg.png
+
+ should be Fig.1.2
+
+.. figure:: rimg.png
+
+ should be Fig.1.3
+
+.. csv-table:: should be Table 1.2
+ :header-rows: 0
+
+ hello,world
+
+.. csv-table:: should be Table 1.3
+ :header-rows: 0
+
+ hello,world
+
+.. code-block:: python
+ :caption: should be List 1.2
+
+ print('hello world')
+
+.. code-block:: python
+ :caption: should be List 1.3
+
+ print('hello world')
+
+Foo A1
+------
+
+Foo B
+=====
+
+Foo B1
+------
+
+.. figure:: rimg.png
+
+ should be Fig.1.4
+
+.. csv-table:: should be Table 1.4
+ :header-rows: 0
+
+ hello,world
+
+.. code-block:: python
+ :caption: should be List 1.4
+
+ print('hello world')
diff --git a/tests/roots/test-numfig/index.rst b/tests/roots/test-numfig/index.rst
new file mode 100644
index 00000000..7bdf135c
--- /dev/null
+++ b/tests/roots/test-numfig/index.rst
@@ -0,0 +1,50 @@
+test-tocdepth
+=============
+
+.. toctree::
+ :numbered:
+
+ foo
+ bar
+
+.. _fig1:
+
+.. figure:: rimg.png
+
+ should be Fig.1
+
+.. figure:: rimg.png
+
+ should be Fig.2
+
+.. _table1:
+
+.. csv-table:: should be Table 1
+ :header-rows: 0
+
+ hello,world
+
+.. csv-table:: should be Table 2
+ :header-rows: 0
+
+ hello,world
+
+.. _code1:
+
+.. code-block:: python
+ :caption: should be List 1
+
+ print('hello world')
+
+.. code-block:: python
+ :caption: should be List 2
+
+ print('hello world')
+
+
+* Fig.1 is :numref:`fig1`
+* Fig.2.2 is :numref:`Figure# <fig22>`
+* Table.1 is :numref:`table1`
+* Table.2.2 is :numref:`Table:# <table22>`
+* List.1 is :numref:`code1`
+* List.2.2 is :numref:`Code-# <code22>`
diff --git a/tests/roots/test-numfig/rimg.png b/tests/roots/test-numfig/rimg.png
new file mode 100644
index 00000000..1081dc14
--- /dev/null
+++ b/tests/roots/test-numfig/rimg.png
Binary files differ
diff --git a/tests/roots/test-only-directive/conf.py b/tests/roots/test-only-directive/conf.py
deleted file mode 100644
index bcb4305d..00000000
--- a/tests/roots/test-only-directive/conf.py
+++ /dev/null
@@ -1,2 +0,0 @@
-
-project = 'test-only-directive'
diff --git a/tests/roots/test-setup/doc/contents.txt b/tests/roots/test-setup/doc/contents.txt
index cb52405f..56960f53 100644
--- a/tests/roots/test-setup/doc/contents.txt
+++ b/tests/roots/test-setup/doc/contents.txt
@@ -1,5 +1,5 @@
-contents
-=========
-
-spam egg ham
-
+contents
+=========
+
+spam egg ham
+
diff --git a/tests/roots/test-templating/autosummary_templating.txt b/tests/roots/test-templating/autosummary_templating.txt
index 05643a02..6b396a3f 100644
--- a/tests/roots/test-templating/autosummary_templating.txt
+++ b/tests/roots/test-templating/autosummary_templating.txt
@@ -4,10 +4,4 @@ Autosummary templating test
.. autosummary::
:toctree: generated
- sphinx.application.Sphinx
-
-.. currentmodule:: sphinx.application
-
-.. autoclass:: TemplateBridge
-
- .. automethod:: render
+ sphinx.application.TemplateBridge
diff --git a/tests/roots/test-tocdepth/bar.rst b/tests/roots/test-tocdepth/bar.rst
new file mode 100644
index 00000000..d70dec90
--- /dev/null
+++ b/tests/roots/test-tocdepth/bar.rst
@@ -0,0 +1,27 @@
+:tocdepth: 2
+
+===
+Bar
+===
+
+should be 2
+
+Bar A
+=====
+
+should be 2.1
+
+.. toctree::
+
+ baz
+
+Bar B
+=====
+
+should be 2.2
+
+Bar B1
+------
+
+should be 2.2.1
+
diff --git a/tests/roots/test-tocdepth/baz.rst b/tests/roots/test-tocdepth/baz.rst
new file mode 100644
index 00000000..b07fa050
--- /dev/null
+++ b/tests/roots/test-tocdepth/baz.rst
@@ -0,0 +1,5 @@
+Baz A
+-----
+
+should be 2.1.1
+
diff --git a/tests/roots/test-tocdepth/conf.py b/tests/roots/test-tocdepth/conf.py
new file mode 100644
index 00000000..f81c30bc
--- /dev/null
+++ b/tests/roots/test-tocdepth/conf.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+master_doc = 'index'
diff --git a/tests/roots/test-tocdepth/foo.rst b/tests/roots/test-tocdepth/foo.rst
new file mode 100644
index 00000000..61fd539f
--- /dev/null
+++ b/tests/roots/test-tocdepth/foo.rst
@@ -0,0 +1,26 @@
+===
+Foo
+===
+
+should be 1
+
+Foo A
+=====
+
+should be 1.1
+
+Foo A1
+------
+
+should be 1.1.1
+
+Foo B
+=====
+
+should be 1.2
+
+Foo B1
+------
+
+should be 1.2.1
+
diff --git a/tests/roots/test-tocdepth/index.rst b/tests/roots/test-tocdepth/index.rst
new file mode 100644
index 00000000..0b651d48
--- /dev/null
+++ b/tests/roots/test-tocdepth/index.rst
@@ -0,0 +1,8 @@
+test-tocdepth
+=============
+
+.. toctree::
+ :numbered:
+
+ foo
+ bar
diff --git a/tests/roots/test-versioning/added.txt b/tests/roots/test-versioning/added.txt
new file mode 100644
index 00000000..22a70739
--- /dev/null
+++ b/tests/roots/test-versioning/added.txt
@@ -0,0 +1,20 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
+
+Woho another paragraph, if this test fails we really have a problem because
+this means the algorithm itself fails and not the diffing algorithm which is
+pretty much doomed anyway as it probably fails for some kind of language
+respecting certain nodes anyway but we can't work around that anyway.
diff --git a/tests/roots/test-versioning/conf.py b/tests/roots/test-versioning/conf.py
new file mode 100644
index 00000000..edcf9295
--- /dev/null
+++ b/tests/roots/test-versioning/conf.py
@@ -0,0 +1,3 @@
+project = 'versioning test root'
+master_doc = 'index'
+source_suffix = '.txt'
diff --git a/tests/roots/test-versioning/deleted.txt b/tests/roots/test-versioning/deleted.txt
new file mode 100644
index 00000000..a1a9c4c9
--- /dev/null
+++ b/tests/roots/test-versioning/deleted.txt
@@ -0,0 +1,12 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/roots/test-versioning/deleted_end.txt b/tests/roots/test-versioning/deleted_end.txt
new file mode 100644
index 00000000..f30e6300
--- /dev/null
+++ b/tests/roots/test-versioning/deleted_end.txt
@@ -0,0 +1,11 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
diff --git a/tests/roots/test-versioning/index.txt b/tests/roots/test-versioning/index.txt
new file mode 100644
index 00000000..9d098f75
--- /dev/null
+++ b/tests/roots/test-versioning/index.txt
@@ -0,0 +1,13 @@
+Versioning Stuff
+================
+
+.. toctree::
+
+ original
+ added
+ insert
+ deleted
+ deleted_end
+ modified
+ insert_beginning
+ insert_similar
diff --git a/tests/roots/test-versioning/insert.txt b/tests/roots/test-versioning/insert.txt
new file mode 100644
index 00000000..1c157cc9
--- /dev/null
+++ b/tests/roots/test-versioning/insert.txt
@@ -0,0 +1,18 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+So this paragraph is just something I inserted in this document to test if our
+algorithm notices that this paragraph is not just a changed version.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/roots/test-versioning/insert_beginning.txt b/tests/roots/test-versioning/insert_beginning.txt
new file mode 100644
index 00000000..57102a76
--- /dev/null
+++ b/tests/roots/test-versioning/insert_beginning.txt
@@ -0,0 +1,18 @@
+Versioning test text
+====================
+
+Apperantly inserting a paragraph at the beginning of a document caused
+problems earlier so this document should be used to test that.
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/roots/test-versioning/insert_similar.txt b/tests/roots/test-versioning/insert_similar.txt
new file mode 100644
index 00000000..ee9b5305
--- /dev/null
+++ b/tests/roots/test-versioning/insert_similar.txt
@@ -0,0 +1,17 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/roots/test-versioning/modified.txt b/tests/roots/test-versioning/modified.txt
new file mode 100644
index 00000000..49cdad93
--- /dev/null
+++ b/tests/roots/test-versioning/modified.txt
@@ -0,0 +1,17 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. Inserting something silly as a modification, btw. have
+you seen the typo below?. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones. So this is a small
+modification by adding something to this paragraph.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hoep it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/roots/test-versioning/original.txt b/tests/roots/test-versioning/original.txt
new file mode 100644
index 00000000..b3fe0609
--- /dev/null
+++ b/tests/roots/test-versioning/original.txt
@@ -0,0 +1,15 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.