diff options
| author | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-29 15:13:58 +0000 |
|---|---|---|
| committer | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-29 15:13:58 +0000 |
| commit | 2878fa7b35a30d1529354812c0113fe4b0dd37cc (patch) | |
| tree | cbb233c5ef7e2fde8cc25571adb6e60080e3a680 /docutils/test | |
| parent | 93f80faabc20b0b827d2996aa5ab25eb2d28978a (diff) | |
| download | docutils-2878fa7b35a30d1529354812c0113fe4b0dd37cc.tar.gz | |
Merged adjacent-citations branch to trunk.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5623 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
| -rwxr-xr-x | docutils/test/test_parsers/test_rst/test_inline_markup.py | 16 | ||||
| -rwxr-xr-x | docutils/test/test_writers/test_latex2e.py | 47 |
2 files changed, 63 insertions, 0 deletions
diff --git a/docutils/test/test_parsers/test_rst/test_inline_markup.py b/docutils/test/test_parsers/test_rst/test_inline_markup.py index fe1c1aff2..6ddaa2dce 100755 --- a/docutils/test/test_parsers/test_rst/test_inline_markup.py +++ b/docutils/test/test_parsers/test_rst/test_inline_markup.py @@ -637,6 +637,14 @@ totest['footnote_reference'] = [ <paragraph> <footnote_reference auto="*" ids="id1"> """], +["""\ +Adjacent footnote refs are not possible: [*]_[#label]_ [#]_[2]_ [1]_[*]_ +""", +"""\ +<document source="test data"> + <paragraph> + Adjacent footnote refs are not possible: [*]_[#label]_ [#]_[2]_ [1]_[*]_ +"""], ] totest['citation_reference'] = [ @@ -668,6 +676,14 @@ totest['citation_reference'] = [ CIT1 but not [CIT 1]_ """], +["""\ +Adjacent citation refs are not possible: [citation]_[CIT1]_ +""", +"""\ +<document source="test data"> + <paragraph> + Adjacent citation refs are not possible: [citation]_[CIT1]_ +"""], ] totest['substitution_references'] = [ diff --git a/docutils/test/test_writers/test_latex2e.py b/docutils/test/test_writers/test_latex2e.py index fea5e537c..217bff415 100755 --- a/docutils/test/test_writers/test_latex2e.py +++ b/docutils/test/test_writers/test_latex2e.py @@ -249,6 +249,53 @@ The underscore is mishandled. ] +totest_latex_citations['adjacent_citations'] = [ +# input +["""\ +Two non-citations: [MeYou2007]_[YouMe2007]_. + +Need to be separated for grouping: [MeYou2007]_ [YouMe2007]_. + +Two spaces (or anything else) for no grouping: [MeYou2007]_ [YouMe2007]_. + +But a line break should work: [MeYou2007]_ +[YouMe2007]_. + +.. [MeYou2007] not. +.. [YouMe2007] important. +""", +## # expected output +latex_head + """\ +\\title{} +\\author{} +\\date{} +\\raggedbottom +\\begin{document} + +\\setlength{\\locallinewidth}{\\linewidth} + +Two non-citations: {[}MeYou2007{]}{\_}{[}YouMe2007{]}{\_}. + +Need to be separated for grouping: \cite{MeYou2007,YouMe2007}. + +Two spaces (or anything else) for no grouping: \cite{MeYou2007} \cite{YouMe2007}. + +But a line break should work: \cite{MeYou2007,YouMe2007}. + +\\begin{thebibliography}{MeYou2007} +\\bibitem[MeYou2007]{MeYou2007}{ +not. +} +\\bibitem[YouMe2007]{YouMe2007}{ +important. +} +\\end{thebibliography} + +\\end{document} +"""], +] + + totest['enumerated_lists'] = [ # input ["""\ |
