incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: [lucy-dev] Generalize Tutorial for multiple host languages
Date Mon, 08 Nov 2010 19:05:02 GMT
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" );

Marvin Humphrey


Mime
View raw message