incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karman <pe...@peknet.com>
Subject Re: [lucy-dev] Generalize Tutorial for multiple host languages
Date Tue, 09 Nov 2010 02:36:04 GMT
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.
> 
> This is a good plan; I just hadn't figured out how to make it work before.
> 
> Perhaps we could divide the sample scripts up into testable subroutines, then
> performing a require/do to import its subs into the current namespace.
> 
>     require "sample/indexer.pl" or die $@;
>     ok( parse_file("sample/us_constitution/amend10.txt"), "parse_file" );
> 

sounds reasonable.


-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com

Mime
View raw message