From fc99ef2ab3e60b4911a62817595d734424e58e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Milde?= Date: Tue, 28 May 2019 11:53:49 +0200 Subject: [PATCH] ctest test documents for lyx2lyx. Currently failing due to an error in revert_language(). --- .../export/lyx2lyx/revert-languages-babel.lyx | 269 ++++++++++++++++++ .../lyx2lyx/revert-languages-polyglossia.lyx | 269 ++++++++++++++++++ development/autotests/ignoredTests | 13 +- development/autotests/invertedTests | 14 + 4 files changed, 560 insertions(+), 5 deletions(-) create mode 100644 autotests/export/lyx2lyx/revert-languages-babel.lyx create mode 100644 autotests/export/lyx2lyx/revert-languages-polyglossia.lyx diff --git a/autotests/export/lyx2lyx/revert-languages-babel.lyx b/autotests/export/lyx2lyx/revert-languages-babel.lyx new file mode 100644 index 0000000000..4d5faa636e --- /dev/null +++ b/autotests/export/lyx2lyx/revert-languages-babel.lyx @@ -0,0 +1,269 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 575 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass article +\begin_preamble +\@ifpackageloaded{fontspec}{% + \newfontfamily\friulanfont{FreeSans}}{% + \AtBeginDocument{\addto\extrasfrilulan{\sffamily}}} +\end_preamble +\use_default_options true +\maintain_unincluded_children false +\language english +\language_package default +\inputencoding utf8 +\fontencoding auto +\font_roman "lmodern" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\use_dash_ligatures true +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\float_placement class +\float_alignment class +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry false +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 1 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package stackrel 1 +\use_package stmaryrd 1 +\use_package undertilde 1 +\cite_engine basic +\cite_engine_type default +\biblio_style plain +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\justification true +\use_refstyle 1 +\use_minted 0 +\use_lineno 0 +\lineno_options \index Index +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation indent +\paragraph_indentation default +\is_math_indent 0 +\math_numbering_side default +\quotes_style english +\dynamic_quotes 0 +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tablestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard +Document mixing English and Friulan text. +\end_layout + +\begin_layout Standard + +\lang friulan +This is a Friulan paragraph. +\end_layout + +\begin_layout Standard +Followed by an English paragraph with one +\lang friulan +Friulan +\lang english + word. +\end_layout + +\begin_layout Quote + +\lang friulan +This is a Friulan quote. +\end_layout + +\begin_layout Standard +Followed by an English +\begin_inset Foot +status open + +\begin_layout Plain Layout + +\lang friulan +Friulan footnote +\end_layout + +\end_inset + + paragraph. +\end_layout + +\begin_layout Enumerate +List with +\end_layout + +\begin_layout Enumerate + +\lang friulan +Friulan paragraphs +\end_layout + +\begin_layout Enumerate + +\lang friulan +in the middle +\end_layout + +\begin_layout Enumerate +of it. +\end_layout + +\begin_layout Standard +\begin_inset Float table +placement document +alignment document +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Caption Standard + +\begin_layout Plain Layout + +\lang friulan +Friulan caption +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +table +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\lang friulan +with +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\lang friulan +Friulan +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +cells +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +English standard paragraph. +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Lyxlist with +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 + +\lang friulan +Friulan +\lang english + label and +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Friulan +\lang friulan +content +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +inside it. +\end_layout + +\end_body +\end_document diff --git a/autotests/export/lyx2lyx/revert-languages-polyglossia.lyx b/autotests/export/lyx2lyx/revert-languages-polyglossia.lyx new file mode 100644 index 0000000000..4277074688 --- /dev/null +++ b/autotests/export/lyx2lyx/revert-languages-polyglossia.lyx @@ -0,0 +1,269 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 575 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass article +\begin_preamble +\@ifpackageloaded{fontspec}{% + \newfontfamily\friulanfont{FreeSans}}{% + \AtBeginDocument{\addto\extrasfrilulan{\sffamily}}} +\end_preamble +\use_default_options true +\maintain_unincluded_children false +\language english +\language_package default +\inputencoding utf8 +\fontencoding auto +\font_roman "lmodern" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts true +\font_sc false +\font_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\use_dash_ligatures true +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\float_placement class +\float_alignment class +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry false +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 1 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package stackrel 1 +\use_package stmaryrd 1 +\use_package undertilde 1 +\cite_engine basic +\cite_engine_type default +\biblio_style plain +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\justification true +\use_refstyle 1 +\use_minted 0 +\use_lineno 0 +\lineno_options \index Index +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation indent +\paragraph_indentation default +\is_math_indent 0 +\math_numbering_side default +\quotes_style english +\dynamic_quotes 0 +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tablestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard +Document mixing English and Friulan text. +\end_layout + +\begin_layout Standard + +\lang friulan +This is a Friulan paragraph. +\end_layout + +\begin_layout Standard +Followed by an English paragraph with one +\lang friulan +Friulan +\lang english + word. +\end_layout + +\begin_layout Quote + +\lang friulan +This is a Friulan quote. +\end_layout + +\begin_layout Standard +Followed by an English +\begin_inset Foot +status open + +\begin_layout Plain Layout + +\lang friulan +Friulan footnote +\end_layout + +\end_inset + + paragraph. +\end_layout + +\begin_layout Enumerate +List with +\end_layout + +\begin_layout Enumerate + +\lang friulan +Friulan paragraphs +\end_layout + +\begin_layout Enumerate + +\lang friulan +in the middle +\end_layout + +\begin_layout Enumerate +of it. +\end_layout + +\begin_layout Standard +\begin_inset Float table +placement document +alignment document +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Caption Standard + +\begin_layout Plain Layout + +\lang friulan +Friulan caption +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +table +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\lang friulan +with +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\lang friulan +Friulan +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +cells +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +English standard paragraph. +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Lyxlist with +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 + +\lang friulan +Friulan +\lang english + label and +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Friulan +\lang friulan +content +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +inside it. +\end_layout + +\end_body +\end_document diff --git a/development/autotests/ignoredTests b/development/autotests/ignoredTests index 21343d5538..c6b84617ac 100644 --- a/development/autotests/ignoredTests +++ b/development/autotests/ignoredTests @@ -15,10 +15,6 @@ Sublabel: problematic export/examples/Modules/Noweb_lyx16 export/examples/Modules/Noweb2LyX_lyx16 -# Tests created for lyx2lyx-tests only -!export/export/lyx2lyx/lyx_.*_test_lyx[12][1236] -.*/export/lyx2lyx/lyx_.*_test.* - # Ignore MergedManuals_xhtml because the test is very time-consuming # and the underlying subdocuments are already tested # Ignore MergedManuals_lyx2[2-9] too @@ -109,7 +105,7 @@ export/examples/ja/Modules/Sweave.* # CJK fails (sometimes) with Xe/LuaTeX and 8-bit fonts: ##### export/examples/ja/Multilingual_Typesetting_.*CJK.(dvi3|pdf5)_texF -export/.*/zh_CN/.*(dvi3|pdf[45])_texF +export/.*/(ko|zh_CN)/.*(dvi3|pdf[45])_texF export/export/latex/CJK/zh_CN-toc_*.(dvi3|pdf[45])_texF @@ -187,10 +183,17 @@ export/export/latex/lyxbugs/6197-polish-amssymb_pdf5_systemF # don't test with TeX fonts: export/export/latex/languages/supported-languages_babel_non-tex_.*(dvi|pdf.?|texF) export/export/latex/languages/supported-languages_polyglossia_.*(dvi|pdf.?|texF) +export/export/latex/languages/supported-languages_luatex_.*(dvi|pdf.?|texF) export/export/latex/lyxbugs-resolved/9633-.*(dvi|pdf.?|texF) export/export/latex/lyxbugs/11522-systemfonts-Math-missingchars_pdf5_texF export/export/latex/lyxbugs/wrong_output_3059-rtl-tables-xetex_pdf4_texF +# lyx2lyx +# dedicated lyx2lyx tests +!export/export/lyx2lyx/.*lyx.. +export/export/lyx2lyx/.* + + # HTML # don't check loading, lyx2lyx, or export to other LyX versions or DVI/PDF check_load/export/xhtml/.* diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index eabb79c35b..d5df2ec8de 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -77,6 +77,13 @@ export/examples/ja/Graphics_and_Insets/XY-Pic.*_systemF # Document class js*.cls requires platex <-> Xe/LuaTeX, # fixed with "bxjs*.cls" +# lyx2lyx: revert_language() compilation errors (cf. #9633) +# ! LaTeX Error: \begin{otherlanguage} on input line 36 ended by \end{quote}. +# with friulan, occitan, and piedmontese also: +# ! LaTeX Error: Can be used only in preamble. +# l.42 \AtEndPreamble +export/export/lyx2lyx/revert-languages-.*_lyx(16|2[012]) + # ================================================ Sublabel: lyxbugs # LyX bugs with a Trac number. @@ -214,6 +221,10 @@ export/doc/(sk|nb)/Intro_(dvi3|pdf5)_systemF # \setLR ->\@RTLfalse \luatexpardir export/export/latex/languages/supported-languages_polyglossia_(dvi3|pdf5)_systemF +# Systemcall: 'lualatex "supported-languages.tex"' finished with exit code 1 +# but no error in log and PDF is fine +export/export/latex/languages/supported-languages_luatex_(dvi3|pdf5)_systemF + # Some packages fail with XeTeX/LuaTeX # Reported upstream (https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184435.html) @@ -244,6 +255,9 @@ export/templates/Presentations/Slides_.*_systemF # (TL 17 works). export/export/latex/inputenc-xetex-utf8-expl3-bug_pdf4_texF +# Korean with LuaTeX: +# Language korean not found in language.dat.lua +export/examples/ko/Welcome_(dvi3|pdf5)_systemF # Arabic #