From 9383328cfe16fff10c3edcc2f6dd585d04dfa4ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Milde?= Date: Sat, 27 Apr 2019 20:09:58 +0200 Subject: [PATCH] ctests: Sort dedicated test documents for language support. --- .../export/latex/cyrillic-accent-ascii.lyx | 182 ------- .../en-ar_language-default.lyx | 0 .../en-ja_platex.lyx} | 0 .../en-th_language-default.lyx | 0 .../latex/{ => languages}/en-th_utf8.lyx | 0 .../es_auto-legacy_luatex.lyx} | 0 .../export/latex/{ => languages}/fa-OT1.lyx | 0 .../latex/{ => languages}/he-scrarticle.lyx | 0 .../latex/{ => languages}/ru-accent-ascii.lyx | 58 ++- .../{ => languages}/supported-languages.lyx | 0 .../export/latex/languages/th-en_utf8.lyx | 478 ++++++++++++++++++ ...uk-babel-date-missing-chars-with-ascii.lyx | 0 development/autotests/ignoredTests | 3 +- development/autotests/invertedTests | 10 +- development/autotests/unreliableTests | 4 +- 15 files changed, 543 insertions(+), 192 deletions(-) delete mode 100644 autotests/export/latex/cyrillic-accent-ascii.lyx rename autotests/export/latex/{ => languages}/en-ar_language-default.lyx (100%) rename autotests/export/latex/{en_ja_platex.lyx => languages/en-ja_platex.lyx} (100%) rename autotests/export/latex/{ => languages}/en-th_language-default.lyx (100%) rename autotests/export/latex/{ => languages}/en-th_utf8.lyx (100%) rename autotests/export/latex/{es_auto-legacy.lyx => languages/es_auto-legacy_luatex.lyx} (100%) rename autotests/export/latex/{ => languages}/fa-OT1.lyx (100%) rename autotests/export/latex/{ => languages}/he-scrarticle.lyx (100%) rename autotests/export/latex/{ => languages}/ru-accent-ascii.lyx (83%) rename autotests/export/latex/{ => languages}/supported-languages.lyx (100%) create mode 100644 autotests/export/latex/languages/th-en_utf8.lyx rename autotests/export/latex/{ => languages}/uk-babel-date-missing-chars-with-ascii.lyx (100%) diff --git a/autotests/export/latex/cyrillic-accent-ascii.lyx b/autotests/export/latex/cyrillic-accent-ascii.lyx deleted file mode 100644 index 8b062e2d6a..0000000000 --- a/autotests/export/latex/cyrillic-accent-ascii.lyx +++ /dev/null @@ -1,182 +0,0 @@ -#LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 566 -\begin_document -\begin_header -\save_transient_properties true -\origin unavailable -\textclass article -\use_default_options false -\maintain_unincluded_children false -\language english -\language_package default -\inputencoding ascii -\fontencoding auto -\font_roman "lmodern" "DejaVu Serif" -\font_sans "lmss" "DejaVu Sans" -\font_typewriter "lmtt" "DejaVu Sans Mono" -\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 pdf2 -\output_sync 0 -\bibtex_command default -\index_command default -\float_placement class -\float_alignment class -\paperfontsize 12 -\spacing single -\use_hyperref false -\pdf_title "Введение в LyX" -\pdf_author "LyX Team" -\pdf_subject "LyX-documentation Intro" -\pdf_keywords "LyX, documentation" -\pdf_bookmarks true -\pdf_bookmarksnumbered true -\pdf_bookmarksopen true -\pdf_bookmarksopenlevel 2 -\pdf_breaklinks false -\pdf_pdfborder false -\pdf_colorlinks true -\pdf_backref false -\pdf_pdfusetitle false -\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false" -\papersize a4paper -\use_geometry false -\use_package amsmath 1 -\use_package amssymb 1 -\use_package cancel 0 -\use_package esint 0 -\use_package mathdots 1 -\use_package mathtools 0 -\use_package mhchem 1 -\use_package stackrel 0 -\use_package stmaryrd 0 -\use_package undertilde 0 -\cite_engine basic -\cite_engine_type default -\biblio_style plain -\use_bibtopic false -\use_indices false -\paperorientation portrait -\suppress_date false -\justification false -\use_refstyle 0 -\use_minted 0 -\index Предметный указатель -\shortcut idx -\color #008000 -\end_index -\secnumdepth 3 -\tocdepth 2 -\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 -\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 -Accented cyrillic characters work since LyX 2.4. -\end_layout - -\begin_layout Standard -Test: English document with input encoding ASCII -\end_layout - -\begin_layout Standard -Accent as ERT still fails if the current language not using a cyrillic script - (i.e. - if the -\begin_inset Quotes eld -\end_inset - - -\backslash -textcyr -\begin_inset Quotes erd -\end_inset - - feature is required) -\end_layout - -\begin_layout Quotation -\begin_inset Note Note -status open - -\begin_layout Plain Layout -Вы узн -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -' -\end_layout - -\end_inset - -аете, как использовать LyX. -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -it works for Combining chars -\end_layout - -\begin_layout Quotation -Вы узна́ете, как использовать LyX. -\end_layout - -\begin_layout Standard -(cf. - -\begin_inset Flex URL -status open - -\begin_layout Plain Layout - -http://www.lyx.org/trac/ticket/9637 -\end_layout - -\end_inset - - and -\begin_inset Flex URL -status open - -\begin_layout Plain Layout - -http://www.lyx.org/trac/ticket/6463 -\end_layout - -\end_inset - -) -\end_layout - -\end_body -\end_document diff --git a/autotests/export/latex/en-ar_language-default.lyx b/autotests/export/latex/languages/en-ar_language-default.lyx similarity index 100% rename from autotests/export/latex/en-ar_language-default.lyx rename to autotests/export/latex/languages/en-ar_language-default.lyx diff --git a/autotests/export/latex/en_ja_platex.lyx b/autotests/export/latex/languages/en-ja_platex.lyx similarity index 100% rename from autotests/export/latex/en_ja_platex.lyx rename to autotests/export/latex/languages/en-ja_platex.lyx diff --git a/autotests/export/latex/en-th_language-default.lyx b/autotests/export/latex/languages/en-th_language-default.lyx similarity index 100% rename from autotests/export/latex/en-th_language-default.lyx rename to autotests/export/latex/languages/en-th_language-default.lyx diff --git a/autotests/export/latex/en-th_utf8.lyx b/autotests/export/latex/languages/en-th_utf8.lyx similarity index 100% rename from autotests/export/latex/en-th_utf8.lyx rename to autotests/export/latex/languages/en-th_utf8.lyx diff --git a/autotests/export/latex/es_auto-legacy.lyx b/autotests/export/latex/languages/es_auto-legacy_luatex.lyx similarity index 100% rename from autotests/export/latex/es_auto-legacy.lyx rename to autotests/export/latex/languages/es_auto-legacy_luatex.lyx diff --git a/autotests/export/latex/fa-OT1.lyx b/autotests/export/latex/languages/fa-OT1.lyx similarity index 100% rename from autotests/export/latex/fa-OT1.lyx rename to autotests/export/latex/languages/fa-OT1.lyx diff --git a/autotests/export/latex/he-scrarticle.lyx b/autotests/export/latex/languages/he-scrarticle.lyx similarity index 100% rename from autotests/export/latex/he-scrarticle.lyx rename to autotests/export/latex/languages/he-scrarticle.lyx diff --git a/autotests/export/latex/ru-accent-ascii.lyx b/autotests/export/latex/languages/ru-accent-ascii.lyx similarity index 83% rename from autotests/export/latex/ru-accent-ascii.lyx rename to autotests/export/latex/languages/ru-accent-ascii.lyx index 2214c81321..4a4aa87fea 100644 --- a/autotests/export/latex/ru-accent-ascii.lyx +++ b/autotests/export/latex/languages/ru-accent-ascii.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 566 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true @@ -104,6 +104,7 @@ \papercolumns 1 \papersides 1 \paperpagestyle default +\tablestyle default \tracking_changes false \output_changes false \html_math_output 0 @@ -150,6 +151,61 @@ and as Combining character Вы узна́ете, как использовать LyX. \end_layout +\begin_layout Standard + +\lang english +Accent as ERT still fails if the current language not using a cyrillic script + (i.e. + if the +\begin_inset Quotes eld +\end_inset + + +\backslash +textcyr +\begin_inset Quotes erd +\end_inset + + feature is required) +\begin_inset Note Note +status open + +\begin_layout Plain Layout + +\lang english +Вы узн +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + + +\backslash +' +\end_layout + +\end_inset + +аете, как использовать LyX. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\lang english +It works for Combining chars +\end_layout + +\begin_layout Quotation + +\lang english +Вы узна́ете, как использовать LyX. +\end_layout + \begin_layout Standard (cf. diff --git a/autotests/export/latex/supported-languages.lyx b/autotests/export/latex/languages/supported-languages.lyx similarity index 100% rename from autotests/export/latex/supported-languages.lyx rename to autotests/export/latex/languages/supported-languages.lyx diff --git a/autotests/export/latex/languages/th-en_utf8.lyx b/autotests/export/latex/languages/th-en_utf8.lyx new file mode 100644 index 0000000000..ffc1f573b2 --- /dev/null +++ b/autotests/export/latex/languages/th-en_utf8.lyx @@ -0,0 +1,478 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 573 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass article +\begin_preamble + +\end_preamble +\use_default_options true +\maintain_unincluded_children false +\language thai +\language_package default +\inputencoding utf8 +\fontencoding auto +\font_roman "lmodern" "Norasi" +\font_sans "default" "Garuda" +\font_typewriter "default" "Tlwg Mono" +\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 +\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 Subsection* +Test workaround for Thai language +\end_layout + +\begin_layout Standard +Up to version 2013/03/31 v1.8, Babel’s “thai.ldf” changes character categories + and the definitions for up-/dowcasing of letters (catcode, uccode, lccode) + +\series bold +globally +\series default +. + As a result, high bit characters come out wrong in the output. + UTF8 encoded characters are not parsed but interpreted as byte (=character) + sequences: +\end_layout + +\begin_layout Quotation + +\backslash +languagename +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +languagename +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Quotation + +\backslash +familydefault +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +familydefault +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Quotation + +\backslash +f@encoding +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +makeatletter +\backslash +f@encoding +\backslash +makeatother +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Non-ASCII characters are mis-represented because the bytes are passed to + the (Thai) font as-is: +\end_layout + +\begin_layout Quotation +A0   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ +\end_layout + +\begin_layout Quotation +B0 ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ +\end_layout + +\begin_layout Quotation +C0 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï +\end_layout + +\begin_layout Quotation +D0 +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Ð +\end_layout + +\end_inset + + Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Þ +\end_layout + +\end_inset + + ß +\end_layout + +\begin_layout Quotation +E0 à á â ã ä å æ ç è é ê ë ì í î ï +\end_layout + +\begin_layout Quotation +F0 +\begin_inset Note Note +status open + +\begin_layout Plain Layout +ð +\end_layout + +\end_inset + + ñ ò ó ô õ ö ÷ ø ù ú û ü ý +\begin_inset Note Note +status open + +\begin_layout Plain Layout +þ +\end_layout + +\end_inset + + ÿ +\end_layout + +\begin_layout Standard +Example text in Thai. + Emphasizing works, if +\begin_inset Quotes eld +\end_inset + +fonts-tlwg +\begin_inset Quotes erd +\end_inset + + is loaded +\series bold +after +\series default +Babel: +\end_layout + +\begin_layout Quote + +\series bold +ภาษาไทย +\series default + หรือ +\emph on +ภาษาไทยกลาง +\emph default + เป็นภาษาราชการและภาษาประจำชาติของประเทศไทย ภาษาไทยเป็นภาษาในกลุ่มภาษาไท + ซึ่งเป็นกลุ่มย่อยของตระกูลภาษาไท-กะได สันนิษฐานว่า ภาษาในตระกูลนี้มีถิ่นกำเนิดจ +ากทางตอนใต้ของประเทศจีน และนักภาษาศาสตร์บางส่วนเสนอว่า ภาษาไทยน่าจะมีความเชื่อมโ +ยงกับตระกูลภาษาออสโตร-เอเชียติก ตระกูลภาษาออสโตรนีเซียน และตระกูลภาษาจีน-ทิเบต +\end_layout + +\begin_layout Quote + +\family sans +sans serif: +\series bold +ภาษาไทย +\series default + หรือ ภาษาไทยกลาง +\family default + +\end_layout + +\begin_layout Quote + +\family typewriter +teletype: +\series bold +ภาษาไทย +\series default + หรือ ภาษาไทยกลาง +\family default + +\end_layout + +\begin_layout Standard + +\lang english +Setting the text language to English: +\end_layout + +\begin_layout Quotation + +\lang english + +\backslash +languagename +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +languagename +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Quotation + +\lang english + +\backslash +familydefault +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +familydefault +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Quotation + +\lang english + +\backslash +f@encoding +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +makeatletter +\backslash +f@encoding +\backslash +makeatother +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\lang english +and the Latin supplement characters are written +\end_layout + +\begin_layout Quotation + +\lang english +A0   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ +\end_layout + +\begin_layout Quotation + +\lang english +B0 ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ +\end_layout + +\begin_layout Quotation + +\lang english +C0 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï +\end_layout + +\begin_layout Quotation + +\lang english +D0 Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß +\end_layout + +\begin_layout Quotation + +\lang english +E0 à á â ã ä å æ ç è é ê ë ì í î ï +\end_layout + +\begin_layout Quotation + +\lang english +F0 ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ +\end_layout + +\begin_layout Itemize + +\lang english +catcode 11 or 12 means, the characters are directly passed to the font and + come out wrong when the T1 font encoding differs from latin9. +\end_layout + +\begin_layout Itemize + +\lang english +uc/lccode changes prevent up/downcasing of high-bit characters +\begin_inset Newline newline +\end_inset + +(lösen +\begin_inset Formula $→$ +\end_inset + + +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +MakeUppercase{ +\end_layout + +\end_inset + +lösen +\begin_inset ERT +status open + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + +, LÖSEN +\begin_inset Formula $→$ +\end_inset + + +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +MakeLowercase{ +\end_layout + +\end_inset + +LÖSEN +\begin_inset ERT +status open + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + +). +\end_layout + +\end_body +\end_document diff --git a/autotests/export/latex/uk-babel-date-missing-chars-with-ascii.lyx b/autotests/export/latex/languages/uk-babel-date-missing-chars-with-ascii.lyx similarity index 100% rename from autotests/export/latex/uk-babel-date-missing-chars-with-ascii.lyx rename to autotests/export/latex/languages/uk-babel-date-missing-chars-with-ascii.lyx diff --git a/development/autotests/ignoredTests b/development/autotests/ignoredTests index b14e9a220e..3d7bdd69fb 100644 --- a/development/autotests/ignoredTests +++ b/development/autotests/ignoredTests @@ -84,7 +84,7 @@ export/export/latex/CJK/zh_CN-toc_*.(dvi3|pdf5)_texF # ignore with pdflatex and Xe/LuaTeX with 8-bit fonts: # export/export/latex/.*platex.*(pdf2|texF) -export/export/latex/ja_wrong_auto_encoding_.*(pdf2|texF) +export/export/latex/languages/ja_wrong_auto_encoding_.*(pdf2|texF) # # Most Japanese documents use language "japanese" wich is tied to "platex" # (automatically invoked instead of "latex" to create a DVI file). @@ -171,4 +171,3 @@ lyx2lyx/export/latex/.* export/export/latex/.*(lyx..|xhtml) # don't test with non-TeX fonts: -#export/export/latex/en-th_(LTH|language-default).*systemF diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index 4e7a0a5936..5721012b1a 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -77,7 +77,7 @@ export/templates/Articles/R_Journal_(dvi3|pdf[45])_systemF # Babel and fontenc fails for some supported languages # * check BabelPremble definitions in lib/languages # * fails also due to #11522, see "lyxbugs" below. -export/export/latex/supported-languages_.*_systemF +export/export/latex/languages/supported-languages_.*_systemF # dvipdfm fails with "culmus-latex" fonts, because some of the fonts are # type1 *.pfa while dvipdfm only works with *.pfb fonts: @@ -90,7 +90,7 @@ export/export/latex/supported-languages_.*_systemF # due to the Hebrew vocalisation using Postscript 3 specials # xdvipdfmx:warning: Interpreting PS code failed!!! Output might be broken!!! # xdvipdfmx:warning: Interpreting special command ps: (ps:) failed. -export/export/latex/supported-languages_pdf3 +export/export/latex/languages/supported-languages_pdf3 # Thai with CJK package requires the babel option "thaicjk" instead of "thai". # (see thaifont.txt in the CJK documentation for setup details). @@ -235,7 +235,7 @@ export/examples/ru/.*LyXified.*_texF # New in TL18 -> cf. unreliableTests.varying_versions. # Workaround: suppressing auto-date, setting inputenc to "utf8", or using # date inset (new in LyX 2.4) in the source documents. -export/export/latex/uk-babel-date-missing-chars-with-ascii_(pdf4|dvi3)_texF +export/export/latex/languages/uk-babel-date-missing-chars-with-ascii_(pdf4|dvi3)_texF # the "dvi3" tests for these pass, but have wrong output. export/doc/uk/Intro_pdf4_texF export/examples/uk/Welcome_pdf4_texF @@ -309,7 +309,7 @@ export/.*/ar/.*_texF # Undefined control sequences "\luatexpardir" and "\luatextextdir". export/.*/ar/.*(dvi3|pdf5)_systemF # no Arab charaters with luainputenc -export/export/latex/supported-languages_(dvi3|pdf5)_texF +export/export/latex/languages/supported-languages_(dvi3|pdf5)_texF # Farsi # Polyglossia problem with LuaTeX (undefined command) (cf. Arabic) @@ -330,7 +330,7 @@ export/.*/he/.*_texF # Ukrainian # See comment in unreliableTests -export/export/latex/uk-babel-date-missing-chars-with-ascii_pdf5_texF +export/export/latex/languages/uk-babel-date-missing-chars-with-ascii_pdf5_texF # ================================================ diff --git a/development/autotests/unreliableTests b/development/autotests/unreliableTests index e939e2ca63..3339f72bf4 100644 --- a/development/autotests/unreliableTests +++ b/development/autotests/unreliableTests @@ -125,7 +125,7 @@ export/examples/(|fr/)seminar_(dvi|pdf).* # since TL18, Babel-Ukrainean uses UTF-8 if it detects Xe/LuaTeX (for "\date"). # * garbled output with LuaTeX + TeX fonts (since TL18) # * missing chars with XeTeX + TeX fonts (see invertedTests) -export/export/latex/uk-babel-date-missing-chars-with-ascii_.*_texF +export/export/latex/languages/uk-babel-date-missing-chars-with-ascii_.*_texF export/(doc|examples)/uk/(Intro|Welcome)_.*_texF # new problem with TL18 (see invertedTests) @@ -164,7 +164,7 @@ export/export/latex/es_auto-legacy_texF # * garbled output with LuaTeX + TeX fonts (since TL18) # (date and chapter headings) # * missing chars with XeTeX + TeX fonts (see invertedTests) -export/export/latex/uk-babel-date-missing-chars-with-ascii_.*_texF +export/export/latex/languages/uk-babel-date-missing-chars-with-ascii_.*_texF export/doc/uk/Intro_.*_texF -- 2.39.5