Kornel Benko wrote:

> I get following diffs e.g. for file XeTeX-polyglossia.lyx
> ...
> --- /usr/src/lyx/lyx-git/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx    
> Mon Jul 30 09:33:17 2012
> +++ /usr/BUILD/BuildLyxGit/src/tex2lyx/test/XeTeX-polyglossia.lyx      
> Wed Oct  3 15:54:00 2012 @@ -1,5 +1,5 @@
> -#LyX file created by tex2lyx 2.1.0svn
> -\lyxformat 433
> +#LyX file created by tex2lyx 2.1.0dev
> +\lyxformat 444
>  \begin_document
>  \begin_header
>  \textclass article
> @@ -55,6 +55,10 @@
>  \suppress_date false
>  \justification true
>  \use_refstyle 0
> +\index Index
> +\shortcut idx
> +\color #008000
> +\end_index
>  \secnumdepth 3
>  \tocdepth 3
>  \paragraph_separation indent
> @@ -74,12 +78,14 @@
>  
>  \begin_layout Part
>  
> +\lang british
>  
>  df
>  \end_layout
>  
>  \begin_layout Standard
>  
> +\lang british
>  
>  1 English
>  \lang ancientgreek
> ...

I know. The file format of the test references is outdated, and some bugs 
were introduced in tex2lyx since I submitted them (the \lang british looks 
like one). These differences need to be investigated, and once the bugs are 
fixed and only file format differences and intended differences caused by 
bug fixes are left, the reference needs to be updated.

################################################################################################################
> If I first edit convert XeTeX-polyglossia.lyx.lyx to format 444 (by using
> lyx), then I get ...
> --- /usr/src/lyx/lyx-git/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx    
> Wed Oct  3 15:59:13 2012
> +++ /usr/BUILD/BuildLyxGit/src/tex2lyx/test/XeTeX-polyglossia.lyx      
> Wed Oct  3 16:01:01 2012 @@ -1,9 +1,17 @@
> -#LyX 2.1 created this file. For more info see http://www.lyx.org/
> +#LyX file created by tex2lyx 2.1.0dev
>  \lyxformat 444
>  \begin_document
>  \begin_header
>  \textclass article
>  \begin_preamble
> +
> +
> +
> +
> +
> +
> +
> +
>  
>  \end_preamble
>  \use_default_options false
> @@ -15,7 +23,6 @@
>  \font_roman Linux Libertine O
>  \font_sans Linux Biolinum O
>  \font_typewriter Linux Biolinum O
> -\font_math auto
>  \font_default_family default
>  \use_non_tex_fonts true
>  \font_sc false
> @@ -29,7 +36,7 @@
>  \index_command default
>  \paperfontsize default
>  \spacing single
> -\use_hyperref false
> +\use_hyperref 0
>  \papersize default
>  \use_geometry false
>  \use_package amsmath 1
> @@ -70,10 +77,16 @@
>  \begin_body
>  
>  \begin_layout Part
> +
> +\lang british
> +
>  df
>  \end_layout
>  
>  \begin_layout Standard
> +
> +\lang british
> +
>  1 English
>  \lang ancientgreek
>  ancient Greek
> @@ -82,7 +95,7 @@
>  \begin_inset ERT
>  status collapsed
>  
> -\begin_layout Plain Layout
> +\begin_layout Standard
>  
>  
>  \backslash
> @@ -95,7 +108,7 @@
>  \begin_inset ERT
>  status collapsed
>  
> -\begin_layout Plain Layout
> +\begin_layout Standard
>  
>  {
>  \end_layout
> @@ -110,7 +123,7 @@
>  \begin_inset ERT
>  status collapsed
>  
> -\begin_layout Plain Layout
> +\begin_layout Standard
>  
>  }
>  \end_layout
> @@ -123,12 +136,14 @@
>  \begin_layout Part
>  
>  \lang albanian
> +
>  df
>  \end_layout
>  
>  \begin_layout Standard
>  
>  \lang albanian
> +
>  2 Albanian
>  \lang greek
>  Greek
> @@ -136,32 +151,39 @@
>   Albanian
>  \shape smallcaps
>  smallcaps
> +\shape default
> +
>  \end_layout
>  
>  \begin_layout Part
>  
>  \lang hebrew
> +
>  df
>  \end_layout
>  
>  \begin_layout Standard
>  
>  \lang hebrew
> +
>  3 Hebrew
>  \end_layout
>  
>  \begin_layout Standard
>  
>  \lang hebrew
> +
> +
>  \begin_inset ERT
>  status collapsed
>  
> -\begin_layout Plain Layout
> +\begin_layout Standard
>  
>  %empty language paragraph
>  \end_layout
>  
> -\begin_layout Plain Layout
> +\begin_layout Standard
> +
>  
>  \end_layout
> 
> 
################################################################################################################


The newline differences do sometimes happen, but they are harmless, since 
the newlines are not relevant in .lyx files, so the in-memory representation 
is exactly the same. The other differences should be looked at as well.

The next thing on my list is indeed to fix the bugs that cause the test 
failures and to update the test references, but I will probably be slow as 
well with this task. Once the references are up to date again and the cmake 
test support is finsihed, I'd like to make a successfull regression test run 
mandatory for any change in tex2lyx.


Georg


Reply via email to