Am Freitag, 16. Februar 2018 09:32:39 CET schrieb Guenter Milde
<[email protected]>:
> On 2018-02-15, Kornel Benko wrote:
> > Am Mittwoch, 14. Februar 2018 17:26:47 CET schrieb Guenter Milde
> >
> >> We found and fixed some problems with the new test.
> >> However, there are still problems that go undetected:
> >>
> >> * We currently do not test, whether a backported file can be opened by
> >> the
> >>
> >> target LyX version. This means that instances of new constructs not
> >> handled by lyx2lyx go undetected. (An example are "baseskip%" lengths
> >> in
> >> box insets.)
> >>
> >> Is there a chance, to test the lyx2lyx output with LyX 2.2, 2.1 and
> >> maybe
> >> even 1.6?
> >
> > I don't think so. Remember, we only test with executables just created.
>
> This is a pity. We should, at the very least test all 2.2-exported files
> with 2.2 before releasing 2.3!
>
> Maybe we can add a simple script that opens all lyx22 files in
> autotests/out-home with lyx2.2 and reports failures (affected file(s) +
> eventual error/warning message).
>
Yes.
> ...
>
> >> * Sometimes, the back-converted file will load in LyX but fail to compile
> >>
> >> due to errors in the generated LaTeX. Could we also test this?
> >
> > Should be doable. Something like export to pdflatex as a last step in the
> > process.
>
> This would be nice. It should suffice to do this on the last "round-trip
> version". Instead of "pdflatex" I suggest testing with default output as set
> in the document.
Goor idea. The attached works for me.
> Thanks,
> Günter
Korneldiff --git a/development/autotests/export.cmake b/development/autotests/export.cmake
index 3800ef4..e60e2ea 100755
--- a/development/autotests/export.cmake
+++ b/development/autotests/export.cmake
@@ -134,6 +134,12 @@ if (extension MATCHES "\\.lyx$")
# Check if result file identical to source file
if(result_md5sum STREQUAL ${source_md5sum})
message(STATUS "Source(${LYX_SOURCE}) and dest(${result_file_name}) are equal")
+ message(STATUS "Now try to export the lyx2lyx created file")
+ message(STATUS "Executing ${lyx} -userdir \"${LYX_TESTS_USERDIR}\" -E default \"${result_file_name}.default\" \"${result_file_name}\"")
+ execute_process(
+ COMMAND ${lyx} -userdir "${LYX_TESTS_USERDIR}" -E default "${result_file_name}.default" "${result_file_name}"
+ RESULT_VARIABLE _err
+ ERROR_VARIABLE lyxerr)
break()
else()
message(STATUS "Source(${LYX_SOURCE}) and dest(${result_file_name}) are still different")