From 246d4bdf66271cd72a7dbf5871b91a082a9b01f4 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Tue, 31 May 2016 09:13:35 +0200 Subject: [PATCH] Cmake export tests: Added testcases for erroneous xhtml exports --- autotests/export/IncludeMissingEndTagDiv.lyx | 102 ++++++++++++ autotests/export/MissingEndTagDiv.lyx | 146 +++++++++++++++++ autotests/export/WrongDfnTagHandling.lyx | 160 +++++++++++++++++++ development/autotests/ignoredTests | 3 + development/autotests/suspiciousTests | 4 + 5 files changed, 415 insertions(+) create mode 100644 autotests/export/IncludeMissingEndTagDiv.lyx create mode 100644 autotests/export/MissingEndTagDiv.lyx create mode 100644 autotests/export/WrongDfnTagHandling.lyx diff --git a/autotests/export/IncludeMissingEndTagDiv.lyx b/autotests/export/IncludeMissingEndTagDiv.lyx new file mode 100644 index 0000000000..3e56e2b09e --- /dev/null +++ b/autotests/export/IncludeMissingEndTagDiv.lyx @@ -0,0 +1,102 @@ +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 508 +\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 auto +\fontencoding global +\font_roman "default" "TeX Gyre Termes" +\font_sans "default" "TeX Gyre Pagella" +\font_typewriter "default" "TeX Gyre Cursor" +\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 +\graphics default +\default_output_format pdf5 +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize default +\spacing single +\use_hyperref false +\papersize a4paper +\use_geometry false +\use_package amsmath 0 +\use_package amssymb 0 +\use_package cancel 0 +\use_package esint 0 +\use_package mathdots 0 +\use_package mathtools 0 +\use_package mhchem 0 +\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 true +\use_refstyle 0 +\index Register +\shortcut idx +\color #008000 +\end_index +\paperwidth 22cm +\paperheight 11cm +\leftmargin 1cm +\topmargin 0cm +\rightmargin 1cm +\bottommargin 0cm +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language english +\papercolumns 1 +\papersides 1 +\paperpagestyle empty +\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 +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +addcontentsline{toc}{chapter}{Abstract} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Remove this text or the ERT to make the xhtml export of the main document + work +\end_layout + +\end_body +\end_document diff --git a/autotests/export/MissingEndTagDiv.lyx b/autotests/export/MissingEndTagDiv.lyx new file mode 100644 index 0000000000..4a292a6330 --- /dev/null +++ b/autotests/export/MissingEndTagDiv.lyx @@ -0,0 +1,146 @@ +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 508 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass scrbook +\options intoc,bibliography=totoc,index=totoc,BCOR10mm,captions=tableheading,titlepage,fleqn +\use_default_options true +\begin_modules +customHeadersFooters +\end_modules +\maintain_unincluded_children false +\language english +\language_package default +\inputencoding auto +\fontencoding global +\font_roman "lmodern" "default" +\font_sans "lmss" "default" +\font_typewriter "lmtt" "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 +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command bibtex +\index_command default +\float_placement h +\paperfontsize 12 +\spacing single +\use_hyperref true +\pdf_bookmarks true +\pdf_bookmarksnumbered true +\pdf_bookmarksopen true +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks false +\pdf_pdfborder true +\pdf_colorlinks false +\pdf_backref false +\pdf_pdfusetitle true +\pdf_quoted_options "pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false" +\papersize a4paper +\use_geometry false +\use_package amsmath 2 +\use_package amssymb 2 +\use_package cancel 0 +\use_package esint 1 +\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 true +\justification true +\use_refstyle 0 +\branch chapter-1 +\selected 1 +\filename_suffix 0 +\color #ffaa00 +\end_branch +\branch chapter-2 +\selected 1 +\filename_suffix 0 +\color #55aaff +\end_branch +\branch Summary +\selected 1 +\filename_suffix 0 +\color #7f7f7f +\end_branch +\branch Acknowledgments +\selected 1 +\filename_suffix 0 +\color #ffff00 +\end_branch +\branch Appendix +\selected 1 +\filename_suffix 0 +\color #faf0e6 +\end_branch +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 2 +\paragraph_separation skip +\defskip medskip +\quotes_language english +\papercolumns 1 +\papersides 2 +\paperpagestyle fancy +\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 Subject +Thesis to get the degree of a doctor of philosophy +\end_layout + +\begin_layout Title +Title of the thesis +\end_layout + +\begin_layout Standard +\begin_inset Branch Summary +status open + +\begin_layout Standard +Dissolving or deactivating this branch makes xhtml export work +\end_layout + +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand include +filename "IncludeMissingEndTagDiv.lyx" + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/autotests/export/WrongDfnTagHandling.lyx b/autotests/export/WrongDfnTagHandling.lyx new file mode 100644 index 0000000000..6b1e4b64a3 --- /dev/null +++ b/autotests/export/WrongDfnTagHandling.lyx @@ -0,0 +1,160 @@ +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 508 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass scrbook +\begin_preamble + +\end_preamble +\options refpage,intoc,bibliography=totoc,index=totoc,BCOR7.5mm,captions=tableheading +\use_default_options false +\begin_modules +customHeadersFooters +enumitem +\end_modules +\maintain_unincluded_children false +\language spanish +\language_package babel +\inputencoding auto +\fontencoding global +\font_roman "lmodern" "default" +\font_sans "lmss" "default" +\font_typewriter "lmtt" "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 +\graphics default +\default_output_format pdf2 +\output_sync 0 +\bibtex_command bibtex +\index_command default +\paperfontsize 12 +\spacing single +\use_hyperref true +\pdf_title "Guía del usuario de LyX" +\pdf_author "LyX Team" +\pdf_subject "LyX" +\pdf_keywords "LyX" +\pdf_bookmarks true +\pdf_bookmarksnumbered true +\pdf_bookmarksopen false +\pdf_bookmarksopenlevel 1 +\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 default +\use_geometry false +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 0 +\use_package esint 1 +\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 true +\use_refstyle 0 +\notefontcolor #0000ff +\branch Pregunta +\selected 1 +\filename_suffix 0 +\color #00ff00 +\end_branch +\branch Respuesta +\selected 0 +\filename_suffix 0 +\color #aa55ff +\end_branch +\index Índice +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 2 +\paragraph_separation skip +\defskip medskip +\quotes_language french +\papercolumns 1 +\papersides 2 +\paperpagestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict true +\end_header + +\begin_body + +\begin_layout Title +Guía del usuario de \SpecialChar LyX + +\end_layout + +\begin_layout Author +por el Equipo \SpecialChar LyX + +\begin_inset Newline newline +\end_inset + + +\begin_inset Newline newline +\end_inset + +Versión 2.2.x +\end_layout + +\begin_layout Chapter +Anidaciones separadas +\begin_inset Index idx +status collapsed + +\begin_layout Plain Layout +Anidación +\noun on + ! +\noun default +Separación +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\lang british +Wrong handling of 'dfn' tag in xhtml export +\end_layout + +\begin_layout Standard +\begin_inset CommandInset index_print +LatexCommand printindex +type "idx" + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/development/autotests/ignoredTests b/development/autotests/ignoredTests index 01bd26e04f..adb2ec198b 100644 --- a/development/autotests/ignoredTests +++ b/development/autotests/ignoredTests @@ -44,3 +44,6 @@ export/templates/DocBook_article_(dvi3|pdf[245]).* # Ignore MergedManuals_xhtml because the test is very time-consuming # and the underlying subdocuments are already tested export/doc/(ja/|)MergedManuals_xhtml + +# Used only as include file for some tests +.*/export/IncludeMissingEndTagDiv.* diff --git a/development/autotests/suspiciousTests b/development/autotests/suspiciousTests index 2949ead2a4..3d0d579d30 100644 --- a/development/autotests/suspiciousTests +++ b/development/autotests/suspiciousTests @@ -219,3 +219,7 @@ export/doc/attic/eu_UserGuide_pdf[25].* export/doc/attic/it_(Customization_pdf5|UserGuide_dvi3|UserGuide_pdf4)_systemF export/doc/attic/sk_UserGuide_pdf4_texF export/doc/attic/id_UserGuide_pdf[45]_systemF + +Sublabel: xhtml +export/export/MissingEndTagDiv_xhtml +export/export/WrongDfnTagHandling_xhtml -- 2.39.2