[Libreoffice] regression tests - for word count ...
antlists at youngman.org.uk
Thu Oct 28 15:56:04 PDT 2010
On 28/10/10 10:38, Michael Meeks wrote:
> Hi guys,
> On Wed, 2010-10-27 at 14:42 -0700, LeMoyne wrote:
>> Using the following sample from a git patch one can see one way in which the
>> current counting method comes up with fewer words than other methods do.
> Well - this is fun indeed :-) I strongly suggest that we start to
> create a compile-time regression test based on calc's (see sc/qa/unit/)
> that will automatically create writer, populate it with a number of
> sample texts - and then run the counting code, and verify the output.
>> All these tests are with the aScanner.GetLen() > 1 check in place. With
>> that Len >=2 check, the new counting routine has no problem with single
>> letter words like A, a, 1, -, or just ,
> Right - we need regression tests for all these corner cases - so we get
> the right result :-)
> Anyone particularly brave that feels able to replicate the calc
> regression tests for writer out there ?
I know I'm butting in without knowing the details, but what do you mean
by "the right result". One of the reasons WordPerfect has hung on so
strongly to the lawyer market in the US is that Word does not use the
legal definition of word-count (something to do with footnotes or
footers or that sort of thing). Do we know how Word and WordPerfect
count words, and can we emulate both of them?
Even if we're not getting it right right now, if we define the
regression tests we can then make the code fit :-)
More information about the LibreOffice