diff options
| author | Georg Brandl <georg@python.org> | 2009-06-04 18:47:43 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-06-04 18:47:43 +0200 |
| commit | 202a8e44b605f877439686b7308e9ca5eb1c9a26 (patch) | |
| tree | 22bf3d22fba19dbdd1f3ee637836280510542b74 /tests | |
| parent | 7ed7231c41f290d056686ceccc0410a3e7cf1305 (diff) | |
| parent | 69d6f5617e2be49789905f7ea3067fa903547500 (diff) | |
| download | sphinx-202a8e44b605f877439686b7308e9ca5eb1c9a26.tar.gz | |
merge with 0.6
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/root/includes.txt | 18 | ||||
| -rw-r--r-- | tests/test_build.py | 4 | ||||
| -rw-r--r-- | tests/test_markup.py | 3 |
3 files changed, 19 insertions, 6 deletions
diff --git a/tests/root/includes.txt b/tests/root/includes.txt index b8a6bee8..da36503b 100644 --- a/tests/root/includes.txt +++ b/tests/root/includes.txt @@ -1,3 +1,10 @@ +Testing downloadable files +========================== + +Download :download:`img.png` here. +Download :download:`this <subdir/img.png>` there. +Don't download :download:`this <nonexisting.png>`. + Test file and literal inclusion =============================== @@ -42,9 +49,10 @@ Literalinclude options :prepend: START CODE :append: END CODE -Testing downloadable files -========================== +Test if dedenting before parsing works. -Download :download:`img.png` here. -Download :download:`this <subdir/img.png>` there. -Don't download :download:`this <nonexisting.png>`. +.. highlight:: python + +.. cssclass:: inc-pyobj-dedent +.. literalinclude:: literal.inc + :pyobject: Bar.baz diff --git a/tests/test_build.py b/tests/test_build.py index d81e496e..6668e245 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -43,7 +43,7 @@ ENV_WARNINGS = """\ http://www.python.org/logo.png %(root)s/includes.txt:: (WARNING/2) Encoding 'utf-8-sig' used for reading \ included file u'wrongenc.inc' seems to be wrong, try giving an :encoding: option -%(root)s/includes.txt:60: WARNING: download file not readable: nonexisting.png +%(root)s/includes.txt:4: WARNING: download file not readable: nonexisting.png """ HTML_WARNINGS = ENV_WARNINGS + """\ @@ -136,6 +136,8 @@ if pygments: ur'^foo = u"Including Unicode characters: üöä"\n$', ".//div[@class='inc-preappend highlight-text']/div/pre": r'(?m)^START CODE$', + ".//div[@class='inc-pyobj-dedent highlight-python']/div/pre/span": + r'def', }) HTML_XPATH['subdir/includes.html'].update({ ".//pre/span": 'line 1', diff --git a/tests/test_markup.py b/tests/test_markup.py index 0c5e7468..03c421a1 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -118,3 +118,6 @@ def test_latex_escaping(): u'\\begin{Verbatim}[commandchars=@\\[\\]]\n' u'@PYGZat[]@(@Gamma@)\\@(@infty@)@$@PYGZlb[]@PYGZrb[]\n' u'\\end{Verbatim}') + # in URIs + yield (verify, u'`test <http://example.com/~me/>`_', None, + u'\\href{http://example.com/~me/}{test}') |
