diff options
| author | Georg Brandl <georg@python.org> | 2011-09-22 10:42:09 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2011-09-22 10:42:09 +0200 |
| commit | c5599ea28eeac416ab4646a9ef1b9eb3d783f8b7 (patch) | |
| tree | 76a1db0ec536f130b4394c48be68fee820d8024b /tests/root | |
| parent | ccef6db7cb04db18258c41a4fd5af6384525737a (diff) | |
| parent | 7cabc9f2a989a78753f9ddcbfd941dd3fc45e106 (diff) | |
| download | sphinx-c5599ea28eeac416ab4646a9ef1b9eb3d783f8b7.tar.gz | |
Merge with 1.0
Diffstat (limited to 'tests/root')
| -rw-r--r-- | tests/root/autosummary.txt | 26 | ||||
| -rw-r--r-- | tests/root/bom.po | 12 | ||||
| -rw-r--r-- | tests/root/conf.py | 7 | ||||
| -rw-r--r-- | tests/root/contents.txt | 1 | ||||
| -rw-r--r-- | tests/root/doctest.txt | 47 | ||||
| -rw-r--r-- | tests/root/literal.inc | 2 | ||||
| -rw-r--r-- | tests/root/markup.txt | 35 | ||||
| -rw-r--r-- | tests/root/subdir.po | 9 | ||||
| -rw-r--r-- | tests/root/versioning/added.txt | 20 | ||||
| -rw-r--r-- | tests/root/versioning/deleted.txt | 12 | ||||
| -rw-r--r-- | tests/root/versioning/deleted_end.txt | 11 | ||||
| -rw-r--r-- | tests/root/versioning/index.txt | 13 | ||||
| -rw-r--r-- | tests/root/versioning/insert.txt | 18 | ||||
| -rw-r--r-- | tests/root/versioning/insert_beginning.txt | 18 | ||||
| -rw-r--r-- | tests/root/versioning/insert_similar.txt | 17 | ||||
| -rw-r--r-- | tests/root/versioning/modified.txt | 17 | ||||
| -rw-r--r-- | tests/root/versioning/original.txt | 15 |
17 files changed, 257 insertions, 23 deletions
diff --git a/tests/root/autosummary.txt b/tests/root/autosummary.txt index edf75e32..fc1a35a0 100644 --- a/tests/root/autosummary.txt +++ b/tests/root/autosummary.txt @@ -4,4 +4,28 @@ Autosummary test .. autosummary:: :toctree: generated - sphinx.application.TemplateBridge + 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/root/bom.po b/tests/root/bom.po new file mode 100644 index 00000000..c6025eb1 --- /dev/null +++ b/tests/root/bom.po @@ -0,0 +1,12 @@ +#, fuzzy +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "File with UTF-8 BOM" +msgstr "Datei mit UTF-8" + +msgid "This file has a UTF-8 \"BOM\"." +msgstr "This file has umlauts: äöü." diff --git a/tests/root/conf.py b/tests/root/conf.py index a50029e5..b97ddfcc 100644 --- a/tests/root/conf.py +++ b/tests/root/conf.py @@ -22,7 +22,7 @@ copyright = '2010, Georg Brandl & Team' version = '0.6' release = '0.6alpha1' today_fmt = '%B %d, %Y' -#unused_docs = [] +# unused_docs = [] exclude_patterns = ['_build', '**/excluded.*'] keep_warnings = True pygments_style = 'sphinx' @@ -49,6 +49,11 @@ latex_documents = [ latex_additional_files = ['svgimg.svg'] +texinfo_documents = [ + ('contents', 'SphinxTests', 'Sphinx Tests', + 'Georg Brandl \\and someone else', 'Sphinx Testing', 'Miscellaneous'), +] + value_from_conf_py = 84 coverage_c_path = ['special/*.h'] diff --git a/tests/root/contents.txt b/tests/root/contents.txt index e052e04b..280953b4 100644 --- a/tests/root/contents.txt +++ b/tests/root/contents.txt @@ -26,6 +26,7 @@ Contents: extensions doctest extensions + versioning/index Python <http://python.org/> diff --git a/tests/root/doctest.txt b/tests/root/doctest.txt index 35cdd589..d029cd88 100644 --- a/tests/root/doctest.txt +++ b/tests/root/doctest.txt @@ -30,7 +30,7 @@ Special directives .. testcode:: - print 1+1 + print(1+1) .. testoutput:: @@ -50,30 +50,31 @@ Special directives .. testsetup:: * - from math import floor + def squared(x): + return x * x .. doctest:: - >>> floor(1.2) - 1.0 + >>> squared(2) + 4 .. testcode:: - print floor(1.2) + print(squared(2)) .. testoutput:: - 1.0 + 4 - >>> floor(1.2) - 1.0 + >>> squared(2) + 4 * options for testcode/testoutput blocks .. testcode:: :hide: - print 'Output text.' + print('Output text.') .. testoutput:: :hide: @@ -85,36 +86,44 @@ Special directives .. testsetup:: group1 - from math import ceil + def add(x, y): + return x + y - ``ceil`` is now known in "group1", but not in others. + + ``add`` is now known in "group1", but not in others. .. doctest:: group1 - >>> ceil(0.8) - 1.0 + >>> add(1, 1) + 2 .. doctest:: group2 - >>> ceil(0.8) + >>> add(1, 1) Traceback (most recent call last): ... - NameError: name 'ceil' is not defined + NameError: name 'add' is not defined Interleaving testcode/testoutput: .. testcode:: group1 - print ceil(0.8) + print(squared(3)) .. testcode:: group2 - print floor(0.8) + print(squared(4)) .. testoutput:: group1 - 1.0 + 9 .. testoutput:: group2 - 0.0 + 16 + + +.. testcleanup:: * + + import test_doctest + test_doctest.cleanup_call() diff --git a/tests/root/literal.inc b/tests/root/literal.inc index d5b9890c..694f15ed 100644 --- a/tests/root/literal.inc +++ b/tests/root/literal.inc @@ -1,7 +1,7 @@ # Literally included file using Python highlighting # -*- coding: utf-8 -*- -foo = u"Including Unicode characters: üöä" +foo = "Including Unicode characters: üöä" class Foo: pass diff --git a/tests/root/markup.txt b/tests/root/markup.txt index 1dd86160..dde13a6b 100644 --- a/tests/root/markup.txt +++ b/tests/root/markup.txt @@ -142,6 +142,8 @@ Adding \n to test unescaping. Test :abbr:`abbr (abbreviation)` and another :abbr:`abbr (abbreviation)`. +Testing the :index:`index` role, also available with +:index:`explicit <pair: title; explicit>` title. .. _with: @@ -167,6 +169,18 @@ Tables | 2 | Empty cells: | | +----+----------------+----+ +Table with multicol: + +.. only:: latex + + +----+---------------------+ + | 1 | test! | + +----+---------+------+----+ + | 2 | col | col | c | + | y +---------+------+----+ + | x | test | + +----+---------------------+ + Figures ------- @@ -239,13 +253,25 @@ This tests :CLASS:`role names in uppercase`. * Monty Python .. glossary:: + :sorted: boson Particle with integer spin. - fermion + *fermion* Particle with half-integer spin. + tauon + myon + electron + Examples for fermions. + + über + Gewisse + + änhlich + Dinge + .. productionlist:: try_stmt: `try1_stmt` | `try2_stmt` try1_stmt: "try" ":" `suite` @@ -265,6 +291,8 @@ Index markup double: entry; double triple: index; entry; triple keyword: with + see: from; to + seealso: fromalso; toalso Invalid index markup... @@ -273,6 +301,11 @@ Invalid index markup... pair: keyword: +.. index:: + !Main, !Other + !single: entry; pair + +:index:`!Main` .. _ölabel: diff --git a/tests/root/subdir.po b/tests/root/subdir.po new file mode 100644 index 00000000..f515f220 --- /dev/null +++ b/tests/root/subdir.po @@ -0,0 +1,9 @@ +#, fuzzy +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Including in subdir" +msgstr "translation" diff --git a/tests/root/versioning/added.txt b/tests/root/versioning/added.txt new file mode 100644 index 00000000..22a70739 --- /dev/null +++ b/tests/root/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/root/versioning/deleted.txt b/tests/root/versioning/deleted.txt new file mode 100644 index 00000000..a1a9c4c9 --- /dev/null +++ b/tests/root/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/root/versioning/deleted_end.txt b/tests/root/versioning/deleted_end.txt new file mode 100644 index 00000000..f30e6300 --- /dev/null +++ b/tests/root/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/root/versioning/index.txt b/tests/root/versioning/index.txt new file mode 100644 index 00000000..9d098f75 --- /dev/null +++ b/tests/root/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/root/versioning/insert.txt b/tests/root/versioning/insert.txt new file mode 100644 index 00000000..1c157cc9 --- /dev/null +++ b/tests/root/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/root/versioning/insert_beginning.txt b/tests/root/versioning/insert_beginning.txt new file mode 100644 index 00000000..57102a76 --- /dev/null +++ b/tests/root/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/root/versioning/insert_similar.txt b/tests/root/versioning/insert_similar.txt new file mode 100644 index 00000000..ee9b5305 --- /dev/null +++ b/tests/root/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/root/versioning/modified.txt b/tests/root/versioning/modified.txt new file mode 100644 index 00000000..49cdad93 --- /dev/null +++ b/tests/root/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/root/versioning/original.txt b/tests/root/versioning/original.txt new file mode 100644 index 00000000..b3fe0609 --- /dev/null +++ b/tests/root/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. |
