From c64a23f3c6c9fcd04fb03af3b0e2877c91d76dd8 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 28 May 2016 12:57:46 +0900 Subject: [PATCH] Add testcase for #2382 --- CHANGES | 1 - tests/test_build_latex.py | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/CHANGES b/CHANGES index fba065f11..078599dc6 100644 --- a/CHANGES +++ b/CHANGES @@ -72,7 +72,6 @@ Bugs fixed * #2382: Adjust spacing after abbreviations on figure numbers in LaTeX writer - Release 1.4.1 (released Apr 12, 2016) ===================================== diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 448826b21..375ee8be2 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -177,7 +177,7 @@ def test_numref(app, status, warning): print(result) print(status.getvalue()) print(warning.getvalue()) - assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig. }}' in result + assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig.\\@ }}' in result assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table }}' in result assert '\\SetupFloatingEnvironment{literal-block}{name=Listing }' in result assert '\\hyperref[index:fig1]{Fig. \\ref{index:fig1}}' in result @@ -228,7 +228,7 @@ def test_numref_with_prefix2(app, status, warning): print(status.getvalue()) print(warning.getvalue()) assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Figure:}}' in result - assert '\\def\\fnum@figure{\\figurename\\thefigure.}' in result + assert '\\def\\fnum@figure{\\figurename\\thefigure.\\@}' in result assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Tab\\_}}' in result assert '\\def\\fnum@table{\\tablename\\thetable:}' in result assert '\\SetupFloatingEnvironment{literal-block}{name=Code-}' in result @@ -282,8 +282,8 @@ def test_babel_with_no_language_settings(app, status, warning): assert '\\usepackage[Bjarne]{fncychap}' in result assert ('\\addto\\captionsenglish{\\renewcommand{\\contentsname}{Table of content}}\n' in result) - assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig. }}\n' in result - assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table. }}\n' in result + assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig.\\@ }}\n' in result + assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table.\\@ }}\n' in result assert '\\addto\\extrasenglish{\\def\\pageautorefname{page}}\n' in result assert '\\shorthandoff' not in result @@ -302,8 +302,8 @@ def test_babel_with_language_de(app, status, warning): assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsngerman{\\renewcommand{\\contentsname}{Table of content}}\n' in result) - assert '\\addto\\captionsngerman{\\renewcommand{\\figurename}{Fig. }}\n' in result - assert '\\addto\\captionsngerman{\\renewcommand{\\tablename}{Table. }}\n' in result + assert '\\addto\\captionsngerman{\\renewcommand{\\figurename}{Fig.\\@ }}\n' in result + assert '\\addto\\captionsngerman{\\renewcommand{\\tablename}{Table.\\@ }}\n' in result assert '\\addto\\extrasngerman{\\def\\pageautorefname{page}}\n' in result assert '\\shorthandoff{"}' in result @@ -322,8 +322,8 @@ def test_babel_with_language_ru(app, status, warning): assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsrussian{\\renewcommand{\\contentsname}{Table of content}}\n' in result) - assert '\\addto\\captionsrussian{\\renewcommand{\\figurename}{Fig. }}\n' in result - assert '\\addto\\captionsrussian{\\renewcommand{\\tablename}{Table. }}\n' in result + assert '\\addto\\captionsrussian{\\renewcommand{\\figurename}{Fig.\\@ }}\n' in result + assert '\\addto\\captionsrussian{\\renewcommand{\\tablename}{Table.\\@ }}\n' in result assert '\\addto\\extrasrussian{\\def\\pageautorefname{page}}\n' in result assert '\\shorthandoff' not in result @@ -342,8 +342,8 @@ def test_babel_with_language_tr(app, status, warning): assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsturkish{\\renewcommand{\\contentsname}{Table of content}}\n' in result) - assert '\\addto\\captionsturkish{\\renewcommand{\\figurename}{Fig. }}\n' in result - assert '\\addto\\captionsturkish{\\renewcommand{\\tablename}{Table. }}\n' in result + assert '\\addto\\captionsturkish{\\renewcommand{\\figurename}{Fig.\\@ }}\n' in result + assert '\\addto\\captionsturkish{\\renewcommand{\\tablename}{Table.\\@ }}\n' in result assert '\\addto\\extrasturkish{\\def\\pageautorefname{sayfa}}\n' in result assert '\\shorthandoff{=}' in result @@ -361,8 +361,8 @@ def test_babel_with_language_ja(app, status, warning): assert '\\usepackage{times}' in result assert '\\usepackage[Sonny]{fncychap}' not in result assert '\\renewcommand{\\contentsname}{Table of content}\n' in result - assert '\\renewcommand{\\figurename}{Fig. }\n' in result - assert '\\renewcommand{\\tablename}{Table. }\n' in result + assert '\\renewcommand{\\figurename}{Fig.\\@ }\n' in result + assert '\\renewcommand{\\tablename}{Table.\\@ }\n' in result assert u'\\def\\pageautorefname{ページ}\n' in result assert '\\shorthandoff' not in result @@ -381,8 +381,8 @@ def test_babel_with_unknown_language(app, status, warning): assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsenglish{\\renewcommand{\\contentsname}{Table of content}}\n' in result) - assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig. }}\n' in result - assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table. }}\n' in result + assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig.\\@ }}\n' in result + assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table.\\@ }}\n' in result assert '\\addto\\extrasenglish{\\def\\pageautorefname{page}}\n' in result assert '\\shorthandoff' not in result