Scott Kostyshak wrote:

> A simple and fast set of tests that could be run is to use lyx2lyx to
> do the roundtrip but not to export. Perhaps this is what you're
> referring to? Now that I reread my original email, this is what it
> sounds like I did. But really what I did was this and then I ran the
> export tests. Using only lyx2lyx would rely on lyx2lyx error reporting
> so if that is likely to catch errors then it might be worth it.

My tests that eventually led to 2.0.8.1 where quite simple:

rm -f x.diff
for i in ../../lyx-2.0/lib/doc/*.lyx
do
bn=`basename $i`
python ../lib/lyx2lyx/lyx2lyx < $i > $bn-474.lyx
python ../lib/lyx2lyx/lyx2lyx -t 413 < $bn-474.lyx > $bn-413.lyx
diff -u $i $bn-413.lyx >> x.diff
done

I did not even bother to write a script but simply typed the above commands 
into a shell, and then looked at x.diff

This does not need any error reporting. Of course the test might be too 
strict (e.g. in some cases you'll get empty lines added or removed, which do 
not matter), but for the 2.1->2.0->2.1 roundtrip it worked well.

We definitely need automatic lyx2lyx tests, and it would be really nice if 
somebody could think a bit how they work best and then implement that.


Georg

Reply via email to