Kornel Benko wrote: > Am Dienstag, 1. Januar 2013 um 17:17:32, schrieb Vincent van Ravesteijn > <v...@lyx.org> >> > >> > Sure, and what do you propose instead? >> > >> >> You could use lyxtolyx to convert to latest format. Then export to tex, >> convert to LyX and compare with the lyxtolyx'ed original file. > > This was forbidden by Georg, as he wants to unit-test only tex2lyx.
I can't forbid anything. I explained why I don't like it. However, I like much less your latest change to skip the format line. Please do not add such changes without discussion. This change removes an important part from the tests: For many years, reLyX (the predecessor of tex2lyx) and tex2lyx produced inconsistent output, i.e. not all parts of the document matched the version number. If the consensus is that this change is OK, then please use a different approach instead that is even less work for updating the file format: decouple the tex2lyx and LyX version again, i.e. remove TEX2LYX_VERSION from version.h, and hardcode the number in tex2lyx instead. Then both tex2lyx and the test cases would be updated if somebody wants them to be updated, and not necessarily every time the LyX format is updated. This way, the tests have at least a chance to detect format inconsistencies that are e.g. caused by updates of the LyX parts that tex2lyx uses (e.g. the layout machinery). >> Once in a while we could update the files. Just like the documentation >> files, layout files etc. We usually don't update all for each filechange. The lyout files are usually updated for each format change, and nobody complained so far, although they are many more than the tex2lyx test cases. Concerning the maintability of the tex2lyx tests I still believe that the cheapest workflow is to update LyX, lyx2lx, tex2lyx and tex2lyx test cases all at the same time for version changes. I spent a lot of work some time ago to bring tex2lyx from a pre-2.0 version to current 2.1 (with help from Uwe and others). I certainly won't do something like that again. A big portion of this time was needed to understand the details of the individual format changes. If tex2lyx is updated at the same time with lyx2lyx, then this portion reduces to zero. I admit that each format update is a bit more expensive with my proposal, but the total amount of time spent is less. Please remember that the update of the test cases is one single command only (see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg176014.html). If you all agree that the references should be sent through lyx2lyx before comparison I won't oppose (and Kornel already wrote code for that), but be aware that this adds one more source of errors (lyx2lyx), and that it can produce false alarm as well (if there are insignificant differences in the output, e.g. whitespace at places where it does not matter). Georg