[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: Add "extract" option to already present
From: Thomas Zander <zander () kde ! org>
Date: 2009-06-14 20:56:48
Message-ID: 200906142256.55365.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Sunday 14. June 2009 21.09.46 Jaroslaw S wrote:
> Please let me start by asking: how can we handle the unit tests that
> check contents of generated, say, contents.xml?
What we should do is have a way for koconverter to work without a GUI. So
any filter that has a dialog should be changed to be able to have decent
defaults and not show that dialog if we start koconverter with a special
flag.
But thats a long standing wishlist item already and not really on topic
here.
What you can do is easy; koconverter is a command that you can call like;
koconverter foo.txt bar.odt
and after it returns you can unzip the odt and inspect the results.
> E.g. we are comparing
> the fine with an expected pattern?
there are various ways to do the actual automated test for correctness.
The strategy you want to take depends a lot on the implementation of the
filter. The majority of the filters now generate their own XML. Either in odt
or in kwd format. So I think we should have a simple way to compare xmls
and do it more advanced than just comparing it as text. For example by
writing a tool that loads two xmls into a QDomDocument and it does some
smart comparisons.
Another strategy sounds better long term to me but it requires the filter to
do things differently.
The strategy would load the document we want to convert (.doc etc) into the
KoText library and then call save on it afterwards to save it out as odt.
On the KoText document we can use the same strategy that we do in the unit
tests in kotext/opendocument/tests.
I prefer this solution since its much more robust and maintainable and on
top of that avoids the whole exporting to ODF when testing. Or, in other
words, it avoids each filter to understand ODF. Less to test.
--
Thomas Zander
["signature.asc" (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic