~ubuntu-branches/ubuntu/trusty/python-docutils/trusty-proposed

« back to all changes in this revision

Viewing changes to test/test_writers/test_latex2e.py

  • Committer: Package Import Robot
  • Author(s): Michael Schutte, Jakub Wilk, Michael Schutte, Dmitry Shachnev
  • Date: 2013-08-05 16:47:43 UTC
  • mfrom: (11.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130805164743-00lyz2imgs85ttwz
Tags: 0.11-1
[ Jakub Wilk ]
* Remove martin f. krafft and Ben Finney from Uploaders at their requests.

[ Michael Schutte ]
* New upstream release 0.11, closes: #712284, #714880.
  - Drop patch math-output-html.diff: Fixed upstream.
  - Drop patch fix-buildhtml-progress.diff: Applied upstream.
  - Drop patch strict-csv-parser.diff: Fixed upstream.
  - Drop patch unknown-url-exc-use-repr.diff: Applied upstream.
  - Update patch move-data-to-usr-share.diff: Default stylesheet paths for
    writers/html4css1 have changed.
  - Refresh the remaining patches.
  - New patch no-local-roman.diff: Use the roman module from python-roman
    instead of the copy shipped with docutils.
  - Update information about upstream version control in debian/copyright.
* Change my e-mail host in Uploaders and debian/copyright to @debian.org.
* New patch rst2odt_prepstyles-elementtree.diff: Port the rst2odt_prepstyles
  utility to ElementTree.  Drop Recommends: python-lxml.  Closes: #714319.
* New patch odt-writer-ascii-filenames.diff: Only use ASCII for filenames of
  images embedded in ODT files, closes: #714317.

[ Dmitry Shachnev ]
* Use dh_python2 instead of deprecated dh_pysupport.
* Add XS-Testsuite header, and replace XS-Python-Version with preferred
  X-Python-Version (closes: #685509).
* Add myself to Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf8 -*-
 
1
# -*- coding: utf-8 -*-
2
2
#! /usr/bin/env python
3
3
 
4
 
# $Id: test_latex2e.py 7463 2012-06-22 19:49:51Z milde $
 
4
# $Id: test_latex2e.py 7668 2013-06-04 12:46:30Z milde $
5
5
# Author: engelbert gruber <grubert@users.sourceforge.net>
6
6
# Copyright: This module has been placed in the public domain.
7
7
 
116
116
\usepackage[T1]{fontenc}
117
117
\usepackage[utf8]{inputenc}
118
118
\usepackage[spanish,english]{babel}
119
 
\addto\shorthandsspanish{\spanishdeactivate{."~<>}}
 
119
\AtBeginDocument{\shorthandoff{.<>}}
120
120
""")) + r"""
121
 
Und damit \otherlanguage{spanish}{basta}!
 
121
Und damit \foreignlanguage{spanish}{basta}!
122
122
 
123
123
\end{document}
124
124
"""],
421
421
"""],
422
422
]
423
423
 
424
 
# BUG: need to test for quote replacing if language is de (ngerman).
425
 
 
426
 
totest['quote_mangling'] = [
427
 
# input
428
 
["""
429
 
Depending on language quotes are converted for latex.
430
 
Expecting "en" here.
431
 
 
432
 
Inside literal blocks quotes should be left untouched
433
 
(use only two quotes in test code makes life easier for
434
 
the python interpreter running the test)::
435
 
 
436
 
    ""
437
 
    This is left "untouched" also *this*.
438
 
    ""
439
 
 
440
 
.. parsed-literal::
441
 
 
442
 
    should get "quotes" and *italics*.
443
 
 
444
 
 
445
 
Inline ``literal "quotes"`` should be kept.
446
 
""",
447
 
head + r"""
448
 
Depending on language quotes are converted for latex.
449
 
Expecting ``en'' here.
450
 
 
451
 
Inside literal blocks quotes should be left untouched
452
 
(use only two quotes in test code makes life easier for
453
 
the python interpreter running the test):
454
 
%
455
 
\begin{quote}{\ttfamily \raggedright \noindent
456
 
"{}"\\
457
 
This~is~left~"untouched"~also~*this*.\\
458
 
"{}"
459
 
}
460
 
\end{quote}
461
 
%
462
 
\begin{quote}{\ttfamily \raggedright \noindent
463
 
should~get~"quotes"~and~\emph{italics}.
464
 
}
465
 
\end{quote}
466
 
 
467
 
Inline \texttt{literal "quotes"} should be kept.
468
 
 
469
 
\end{document}
470
 
"""],
471
 
]
 
424
# TODO: need to test for quote replacing if the language uses "ASCII-quotes"
 
425
# as active character (e.g. de (ngerman)).
 
426
 
472
427
 
473
428
totest['table_caption'] = [
474
429
# input
650
605
"""],
651
606
]
652
607
 
653
 
 
654
608
if __name__ == '__main__':
655
609
    import unittest
656
610
    unittest.main(defaultTest='suite')