On Mon, Nov 08, 2010 at 08:36:04PM -0600, Peter Karman wrote:
> Marvin Humphrey wrote on 11/8/10 1:05 PM:
> > On Sun, Nov 07, 2010 at 01:19:00PM -0600, Peter Karman wrote:
> >> The approach I have taken with libswish3 is to make the example code part 
> >> of the
> >> test suite, so that if the API changes, I have to keep the example(s) up 
> >> to date
> >> with it. We could do something similar with the tutorial apps.

> > Perhaps we could divide the sample scripts up into testable subroutines, 
> > then

> sounds reasonable.

Dividing up the sample code into testable subroutines didn't work so well.
There's a conflict between what tests well and what reads well in
sample/tutorial material.

I wound up adding a test (perl/t/binding/702-sample.t) which simply verifies
that the sample apps work -- that indexer.pl creates an index, and that
search.cgi searches the index and returns the expected number of results.

Marvin Humphrey

Reply via email to