Enrico Forestieri wrote:

> I think that the test should not take into account the first two lines
> of the LyX documents. Indeed, there is no reason for failure in this case.
> Look:
> 
> $ ../../../build/src/tex2lyx/tex2lyx box-color-size-space-align.tex
> box-color-size-space-align.lyx Creating file
> /usr/local/src/lyx/lyx-devel/src/tex2lyx/test/box-color-size-space-
align.lyx
> $ diff -u -I '^#LyX' -I '^\\lyxformat' box-color-size-space-align.lyx.lyx
> box-color-size-space-align.lyx <no output>
> 
> So, the only difference is in the first two lines and the test should
> succeed. However, I don't know what is the rationale of these tests.

This has been discussed at length in the past. The very first line does not 
need to be compared (it is only a comment), but the second one is important. 
For example, if the file format number would be ignored, and you had updated 
LYX_FORMAT_TEX2LYX, but forgot the change in src/tex2lyx/text.cpp, then all 
tests would still have been passed, although test-structure.lyx would be 
invalid (file format 475, but still using the old separator layout). 
Therefore, a new file format number invalidates all tests, and one needs to 
manually verify whether the new output is still OK (for the current change I 
did that by searching for --Separator-- in all updated test references, but 
of course the details of the verify step depend strongly on the nature of 
the file format update).


Georg

Reply via email to