summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-09-20 13:03:28 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-09-20 13:03:28 +0000
commit1004cfee85d9916e48b07ef3877b5dcabb7cdfac (patch)
treec2ddf01cb05a92f7541dafa5a504f76c0e02c527 /docutils/test
parent0d417d78c534b9b15b0f0dd46aa38eaa42a54199 (diff)
downloaddocutils-1004cfee85d9916e48b07ef3877b5dcabb7cdfac.tar.gz
Minor test fixes.
Remove workaround for legacy versions of the "hyperref" LaTeX package. Remove spurious import. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8830 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
-rw-r--r--docutils/test/functional/expected/cyrillic.tex21
-rw-r--r--docutils/test/functional/expected/xetex-cyrillic.tex21
-rw-r--r--docutils/test/functional/input/cyrillic.txt20
-rw-r--r--docutils/test/functional/tests/latex_cyrillic.py1
-rw-r--r--docutils/test/functional/tests/xetex_cyrillic.py4
-rw-r--r--docutils/test/test_writers/test_latex2e_misc.py2
6 files changed, 20 insertions, 49 deletions
diff --git a/docutils/test/functional/expected/cyrillic.tex b/docutils/test/functional/expected/cyrillic.tex
index e01cb50f4..79e816882 100644
--- a/docutils/test/functional/expected/cyrillic.tex
+++ b/docutils/test/functional/expected/cyrillic.tex
@@ -18,12 +18,9 @@
%%% Fallback definitions for Docutils-specific commands
-% titlereference standard role
-\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
-
% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
- \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,unicode=true]{hyperref}
+ \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
\usepackage{bookmark}
\urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
@@ -49,18 +46,14 @@
\foreignlanguage{english}{first example: “Hello world”.}
-\section{Notes%
- \label{notes}%
+\section{Примечания%
+ \label{section-2}%
}
-\foreignlanguage{english}{This example tests rendering of Latin and Cyrillic characters by the LaTeX
-and XeTeX writers. Check the compiled PDF for garbage characters in text and
-bookmarks.}
+Этот документ испытивает изображение LaTeXом кириллических букв.
-\foreignlanguage{english}{To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref}
-versions older than v6.79g 2009/11/20, the test caller \texttt{latex\_cyrillic.py}
-sets \texttt{hyperref\_options} to \texttt{'unicode=true'} while \texttt{xetex\_cyrillic.py}
-sets it to \texttt{'unicode=false'}. The recommended option for current
-(2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}.}
+\foreignlanguage{english}{This document tests the rendering of Latin and Cyrillic characters by the
+LaTeX and XeTeX writers. Check the compiled PDF for garbage characters in
+text and bookmarks.}
\end{document}
diff --git a/docutils/test/functional/expected/xetex-cyrillic.tex b/docutils/test/functional/expected/xetex-cyrillic.tex
index 764160cb9..55cf28859 100644
--- a/docutils/test/functional/expected/xetex-cyrillic.tex
+++ b/docutils/test/functional/expected/xetex-cyrillic.tex
@@ -23,12 +23,9 @@
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
-
-% titlereference standard role
-\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
- \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,unicode=false]{hyperref}
+ \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
\usepackage{bookmark}
\urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
@@ -55,18 +52,14 @@
\foreignlanguage{english}{first example: “Hello world”.}
-\section{Notes%
- \label{notes}%
+\section{Примечания%
+ \label{section-2}%
}
-\foreignlanguage{english}{This example tests rendering of Latin and Cyrillic characters by the LaTeX
-and XeTeX writers. Check the compiled PDF for garbage characters in text and
-bookmarks.}
+Этот документ испытивает изображение LaTeXом кириллических букв.
-\foreignlanguage{english}{To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref}
-versions older than v6.79g 2009/11/20, the test caller \texttt{latex\_cyrillic.py}
-sets \texttt{hyperref\_options} to \texttt{'unicode=true'} while \texttt{xetex\_cyrillic.py}
-sets it to \texttt{'unicode=false'}. The recommended option for current
-(2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}.}
+\foreignlanguage{english}{This document tests the rendering of Latin and Cyrillic characters by the
+LaTeX and XeTeX writers. Check the compiled PDF for garbage characters in
+text and bookmarks.}
\end{document}
diff --git a/docutils/test/functional/input/cyrillic.txt b/docutils/test/functional/input/cyrillic.txt
index 38de95383..a78aa4a7e 100644
--- a/docutils/test/functional/input/cyrillic.txt
+++ b/docutils/test/functional/input/cyrillic.txt
@@ -10,23 +10,15 @@ Title
first example: "Hello world".
-Notes
------
-
-.. class:: language-en
+Примечания
+----------
-This example tests rendering of Latin and Cyrillic characters by the LaTeX
-and XeTeX writers. Check the compiled PDF for garbage characters in text and
-bookmarks.
+Этот документ испытивает изображение LaTeXом кириллических букв.
.. class:: language-en
-To work around a problem with Cyrillic in PDF-bookmarks in `hyperref`
-versions older than v6.79g 2009/11/20, the test caller ``latex_cyrillic.py``
-sets ``hyperref_options`` to ``'unicode=true'`` while ``xetex_cyrillic.py``
-sets it to ``'unicode=false'``. The recommended option for current
-(2011-08-24) hyperref versions is ``'pdfencoding=auto'``.
-
-
+This document tests the rendering of Latin and Cyrillic characters by the
+LaTeX and XeTeX writers. Check the compiled PDF for garbage characters in
+text and bookmarks.
diff --git a/docutils/test/functional/tests/latex_cyrillic.py b/docutils/test/functional/tests/latex_cyrillic.py
index 13dc7a496..e204faf5b 100644
--- a/docutils/test/functional/tests/latex_cyrillic.py
+++ b/docutils/test/functional/tests/latex_cyrillic.py
@@ -9,7 +9,6 @@ writer_name = "latex"
# Extra setting we need
-settings_overrides['hyperref_options'] = 'unicode=true'
settings_overrides['font_encoding'] = 'T1,T2A'
settings_overrides['stylesheet'] = 'cmlgc'
settings_overrides['language_code'] = 'ru'
diff --git a/docutils/test/functional/tests/xetex_cyrillic.py b/docutils/test/functional/tests/xetex_cyrillic.py
index 7cc0533c6..3eb7334b8 100644
--- a/docutils/test/functional/tests/xetex_cyrillic.py
+++ b/docutils/test/functional/tests/xetex_cyrillic.py
@@ -7,9 +7,5 @@ writer_name = "xetex"
# Settings
settings_overrides['language_code'] = 'ru'
-# Override the automatic addition of "unicode" option for "russian"
-# language to work around a problem with cyrillic in PDF-bookmarks in
-# hyperref versions < v6.79g 2009/11/20
-settings_overrides['hyperref_options'] = 'unicode=false'
# use "smartquotes" transition:
settings_overrides['smart_quotes'] = True
diff --git a/docutils/test/test_writers/test_latex2e_misc.py b/docutils/test/test_writers/test_latex2e_misc.py
index e833c3112..dfece56c8 100644
--- a/docutils/test/test_writers/test_latex2e_misc.py
+++ b/docutils/test/test_writers/test_latex2e_misc.py
@@ -19,8 +19,6 @@ Miscellaneous LaTeX writer tests.
"""
from __future__ import absolute_import
-import os
-
if __name__ == '__main__':
import __init__
from test_writers import DocutilsTestSupport