Mailing List Archive

r3825 - in trunk/perl: . buildlib lib/KinoSearch/Test t
Author: creamyg
Date: 2008-09-06 11:56:04 -0700 (Sat, 06 Sep 2008)
New Revision: 3825

Added:
trunk/perl/lib/KinoSearch/Test/TestSchema.pm
trunk/perl/lib/KinoSearch/Test/TestUtils.pm
Removed:
trunk/perl/buildlib/KinoTestUtils.pm
trunk/perl/buildlib/TestSchema.pm
Modified:
trunk/perl/MANIFEST
trunk/perl/t/001-build_invindexes.t
trunk/perl/t/023-stepper.t
trunk/perl/t/025-debug.t
trunk/perl/t/029-charbuf.t
trunk/perl/t/051-fsfile.t
trunk/perl/t/101-simple_io.t
trunk/perl/t/105-folder.t
trunk/perl/t/106-locking.t
trunk/perl/t/107-index_file_names.t
trunk/perl/t/108-invindex.t
trunk/perl/t/109-read_locking.t
trunk/perl/t/112-cf_writer.t
trunk/perl/t/113-cf_reader.t
trunk/perl/t/150-polyanalyzer.t
trunk/perl/t/151-analyzer.t
trunk/perl/t/152-inversion.t
trunk/perl/t/153-lc_normalizer.t
trunk/perl/t/155-stopalizer.t
trunk/perl/t/156-stemmer.t
trunk/perl/t/205-seg_reader.t
trunk/perl/t/206-seg_infos.t
trunk/perl/t/209-seg_lexicon_heavy.t
trunk/perl/t/210-deldocs.t
trunk/perl/t/211-seg_posting_list.t
trunk/perl/t/213-segment_merging.t
trunk/perl/t/216-schema.t
trunk/perl/t/304-verify_utf8.t
trunk/perl/t/305-invindexer.t
trunk/perl/t/306-dynamic_schema.t
trunk/perl/t/308-simple.t
trunk/perl/t/501-termquery.t
trunk/perl/t/502-phrasequery.t
trunk/perl/t/507-filter.t
trunk/perl/t/508-hits.t
trunk/perl/t/509-multi_searcher.t
trunk/perl/t/514-and_scorer.t
trunk/perl/t/518-or_scorer.t
trunk/perl/t/519-req_opt_scorer.t
trunk/perl/t/523-and_query.t
trunk/perl/t/524-poly_query.t
trunk/perl/t/525-match_all_query.t
trunk/perl/t/526-not_query.t
trunk/perl/t/527-req_opt_query.t
trunk/perl/t/528-leaf_query.t
trunk/perl/t/529-no_match_query.t
trunk/perl/t/601-queryparser.t
trunk/perl/t/603-query_boosts.t
trunk/perl/t/605-store_pos_boost.t
trunk/perl/t/606-proximity.t
trunk/perl/t/607-queryparser_multi_field.t
trunk/perl/t/610-queryparser_logic.t
trunk/perl/t/701-uscon.t
trunk/perl/t/999-remove_invindexes.t
Log:
Move TestSchema and TestUtils into the main lib tree.


Modified: trunk/perl/MANIFEST
===================================================================
--- trunk/perl/MANIFEST 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/MANIFEST 2008-09-06 18:56:04 UTC (rev 3825)
@@ -2,9 +2,7 @@
Build.PL
buildbin/README
buildlib/KinoSearch/Build.pm
-buildlib/KinoTestUtils.pm
buildlib/Lucy/Build.pm
-buildlib/TestSchema.pm
Changes
lib/KinoSearch.pm
lib/KinoSearch/Analysis/Analyzer.pm
@@ -145,6 +143,8 @@
lib/KinoSearch/Test/TestQueryParser.pm
lib/KinoSearch/Test/TestQueryParserLogic.pm
lib/KinoSearch/Test/TestQueryParserSyntax.pm
+lib/KinoSearch/Test/TestSchema.pm
+lib/KinoSearch/Test/TestUtils.pm
lib/KinoSearch/Test/Util/BBSortEx.pm
lib/KinoSearch/Test/Util/TestCharBuf.pm
lib/KinoSearch/Util/BitVector.pm

Deleted: trunk/perl/buildlib/KinoTestUtils.pm
===================================================================
--- trunk/perl/buildlib/KinoTestUtils.pm 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/buildlib/KinoTestUtils.pm 2008-09-06 18:56:04 UTC (rev 3825)
@@ -1,239 +0,0 @@
-use strict;
-use warnings;
-
-package KinoTestUtils;
-use base qw( Exporter );
-
-our @EXPORT_OK = qw(
- working_dir
- create_working_dir
- remove_working_dir
- create_invindex
- create_uscon_invindex
- test_invindex_loc
- persistent_test_invindex_loc
- init_test_invindex_loc
- get_uscon_docs
- utf8_test_strings
- test_analyzer
- doc_nums_from_td_coll
- modulo_set
-);
-
-use KinoSearch::InvIndex;
-use KinoSearch::InvIndexer;
-use KinoSearch::Store::RAMFolder;
-use KinoSearch::Store::FSFolder;
-use KinoSearch::Analysis::Tokenizer;
-use KinoSearch::Index::PostingsWriter;
-
-# set mem_thesh to 1 kiB in order to expose problems with flushing
-$KinoSearch::Index::PostingsWriter::instance_vars{mem_thresh} = 0x400;
-
-use lib 'sample';
-
-use USConSchema;
-use TestSchema;
-
-use File::Spec::Functions qw( catdir catfile curdir );
-use Encode qw( _utf8_off );
-use File::Path qw( rmtree );
-use Carp;
-
-my $working_dir = catfile( curdir(), 'kinosearch_test' );
-
-# Return a directory within the system's temp directory where we will put all
-# testing scratch files.
-sub working_dir {$working_dir}
-
-sub create_working_dir {
- if ( !-d $working_dir ) {
- mkdir( $working_dir, 0700 )
- or confess "Can't mkdir '$working_dir': $!";
- }
-}
-
-# Verify that this user owns the working dir, then zap it. Returns true upon
-# success.
-sub remove_working_dir {
- my $mode = ( stat $working_dir )[2];
- return unless -d $working_dir;
- $mode &= 07777;
- return unless $mode == 0700;
- rmtree $working_dir;
- return 1;
-}
-
-# Return a location for a test invindex to be used by a single test file. If
-# the test file crashes it cannot clean up after itself, so we put the cleanup
-# routine in a single test file to be run at or near the end of the test
-# suite.
-sub test_invindex_loc {
- return catdir( $working_dir, 'test_invindex' );
-}
-
-# Return a location for a test invindex intended to be shared by multiple
-# test files. It will be cleaned as above.
-sub persistent_test_invindex_loc {
- return catdir( $working_dir, 'persistent_test_invindex' );
-}
-
-# Destroy anything left over in the test_invindex location, then create the
-# directory. Finally, return the path.
-sub init_test_invindex_loc {
- my $dir = test_invindex_loc();
- rmtree $dir;
- die "Can't clean up '$dir'" if -e $dir;
- mkdir $dir or die "Can't mkdir '$dir': $!";
- return $dir;
-}
-
-# Build a RAMInvIndex, using the supplied array of strings as source material.
-# The invindex will have a single field: "content".
-sub create_invindex {
- my @docs = @_;
-
- my $folder = KinoSearch::Store::RAMFolder->new;
- my $invindex = KinoSearch::InvIndex->clobber(
- schema => TestSchema->new,
- folder => $folder,
- );
-
- my $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex, );
- $invindexer->add_doc( { content => $_ } ) for @docs;
- $invindexer->finish;
-
- return $invindex;
-}
-
-# Slurp us constitition docs and build hashrefs.
-sub get_uscon_docs {
-
- my $uscon_dir = catdir( 'sample', 'us_constitution' );
- opendir( my $uscon_dh, $uscon_dir )
- or die "couldn't opendir '$uscon_dir': $!";
- my @filenames = grep {/\.html$/} sort readdir $uscon_dh;
- closedir $uscon_dh or die "couldn't closedir '$uscon_dir': $!";
-
- my %docs;
-
- for my $filename (@filenames) {
- next if $filename eq 'index.html';
- my $filepath = catfile( $uscon_dir, $filename );
- open( my $fh, '<', $filepath )
- or die "couldn't open file '$filepath': $!";
- my $content = do { local $/; <$fh> };
- $content =~ m#<title>(.*?)</title>#s
- or die "couldn't isolate title in '$filepath'";
- my $title = $1;
- $content =~ m#<div id="bodytext">(.*?)</div><!--bodytext-->#s
- or die "couldn't isolate bodytext in '$filepath'";
- my $bodytext = $1;
- $bodytext =~ s/<.*?>//sg;
- $bodytext =~ s/\s+/ /sg;
- my $category
- = $filename =~ /art/ ? 'article'
- : $filename =~ /amend/ ? 'amendment'
- : $filename =~ /preamble/ ? 'preamble'
- : confess "Can't derive category for $filename";
-
- $docs{$filename} = {
- title => $title,
- bodytext => $bodytext,
- url => "/us_constitution/$filename",
- category => $category,
- };
- }
-
- return \%docs;
-}
-
-sub create_uscon_invindex {
- my $invindex = USConSchema->clobber( persistent_test_invindex_loc() );
- my $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
-
- $invindexer->add_doc( { content => "zz$_" } ) for ( 0 .. 10000 );
- $invindexer->finish;
- undef $invindexer;
-
- $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
- my $source_docs = get_uscon_docs();
- $invindexer->add_doc( { content => $_->{bodytext} } )
- for values %$source_docs;
- $invindexer->finish;
- undef $invindexer;
-
- $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
- my @chars = ( 'a' .. 'z' );
- for ( 0 .. 1000 ) {
- my $content = '';
- for my $num_words ( 1 .. int( rand(20) ) ) {
- for ( 1 .. ( int( rand(10) ) + 10 ) ) {
- $content .= @chars[ rand(@chars) ];
- }
- $content .= ' ';
- }
- $invindexer->add_doc( { content => $content } );
- }
- $invindexer->finish( optimize => 1 );
-}
-
-# Return 3 strings useful for verifying UTF-8 integrity.
-sub utf8_test_strings {
- my $smiley = "\x{263a}";
- my $not_a_smiley = $smiley;
- _utf8_off($not_a_smiley);
- my $frowny = $not_a_smiley;
- utf8::upgrade($frowny);
- return ( $smiley, $not_a_smiley, $frowny );
-}
-
-# Verify an Analyzer's transform, transform_text, and split methods.
-sub test_analyzer {
- my ( $analyzer, $source, $expected, $message ) = @_;
-
- my $inversion = KinoSearch::Analysis::Inversion->new( text => $source );
- $inversion = $analyzer->transform($inversion);
- my @got;
- while ( my $token = $inversion->next ) {
- push @got, $token->get_text;
- }
- Test::More::is_deeply( \@got, $expected, "analyze: $message" );
-
- $inversion = $analyzer->transform_text($source);
- @got = ();
- while ( my $token = $inversion->next ) {
- push @got, $token->get_text;
- }
- Test::More::is_deeply( \@got, $expected, "transform_text: $message" );
-
- @got = @{ $analyzer->split($source) };
- Test::More::is_deeply( \@got, $expected, "split: $message" );
-}
-
-# Extract all doc nums from a TopDocCollector. Return two sorted array refs:
-# by_score and by_num.
-sub doc_nums_from_td_coll {
- my $hc = shift;
- my @by_score;
- my $score_docs = $hc->get_hit_q->pop_all;
- my @by_score_then_num = map { $_->get_doc_num }
- sort {
- $b->get_score <=> $a->get_score
- || $a->get_doc_num <=> $b->get_doc_num
- } @$score_docs;
- my @by_num = sort { $a <=> $b } @by_score_then_num;
- return ( \@by_score_then_num, \@by_num );
-}
-
-# Use a modulus to generate a set of numbers.
-sub modulo_set {
- my ( $interval, $max ) = @_;
- my @out;
- for ( my $doc = $interval; $doc < $max; $doc += $interval ) {
- push @out, $doc;
- }
- return \@out;
-}
-
-1;

Deleted: trunk/perl/buildlib/TestSchema.pm
===================================================================
--- trunk/perl/buildlib/TestSchema.pm 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/buildlib/TestSchema.pm 2008-09-06 18:56:04 UTC (rev 3825)
@@ -1,17 +0,0 @@
-use strict;
-use warnings;
-
-package TestSchema;
-use base qw( KinoSearch::Schema );
-use KinoSearch::Analysis::Tokenizer;
-
-our %fields = ( content => 'text', );
-
-sub analyzer { KinoSearch::Analysis::Tokenizer->new }
-
-# Expose problems faced by much larger indexes by using absurdly low values
-# for index_interval and skip_interval.
-sub index_interval {5}
-sub skip_interval {3}
-
-1;

Copied: trunk/perl/lib/KinoSearch/Test/TestSchema.pm (from rev 3824, trunk/perl/buildlib/TestSchema.pm)
===================================================================
--- trunk/perl/lib/KinoSearch/Test/TestSchema.pm (rev 0)
+++ trunk/perl/lib/KinoSearch/Test/TestSchema.pm 2008-09-06 18:56:04 UTC (rev 3825)
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+
+package KinoSearch::Test::TestSchema;
+use base qw( KinoSearch::Schema );
+use KinoSearch::Analysis::Tokenizer;
+
+our %fields = ( content => 'text', );
+
+sub analyzer { KinoSearch::Analysis::Tokenizer->new }
+
+# Expose problems faced by much larger indexes by using absurdly low values
+# for index_interval and skip_interval.
+sub index_interval {5}
+sub skip_interval {3}
+
+1;

Copied: trunk/perl/lib/KinoSearch/Test/TestUtils.pm (from rev 3824, trunk/perl/buildlib/KinoTestUtils.pm)
===================================================================
--- trunk/perl/lib/KinoSearch/Test/TestUtils.pm (rev 0)
+++ trunk/perl/lib/KinoSearch/Test/TestUtils.pm 2008-09-06 18:56:04 UTC (rev 3825)
@@ -0,0 +1,239 @@
+use strict;
+use warnings;
+
+package KinoSearch::Test::TestUtils;
+use base qw( Exporter );
+
+our @EXPORT_OK = qw(
+ working_dir
+ create_working_dir
+ remove_working_dir
+ create_invindex
+ create_uscon_invindex
+ test_invindex_loc
+ persistent_test_invindex_loc
+ init_test_invindex_loc
+ get_uscon_docs
+ utf8_test_strings
+ test_analyzer
+ doc_nums_from_td_coll
+ modulo_set
+);
+
+use KinoSearch::InvIndex;
+use KinoSearch::InvIndexer;
+use KinoSearch::Store::RAMFolder;
+use KinoSearch::Store::FSFolder;
+use KinoSearch::Analysis::Tokenizer;
+use KinoSearch::Index::PostingsWriter;
+
+# set mem_thesh to 1 kiB in order to expose problems with flushing
+$KinoSearch::Index::PostingsWriter::instance_vars{mem_thresh} = 0x400;
+
+use lib 'sample';
+
+use USConSchema;
+use KinoSearch::Test::TestSchema;
+
+use File::Spec::Functions qw( catdir catfile curdir );
+use Encode qw( _utf8_off );
+use File::Path qw( rmtree );
+use Carp;
+
+my $working_dir = catfile( curdir(), 'kinosearch_test' );
+
+# Return a directory within the system's temp directory where we will put all
+# testing scratch files.
+sub working_dir {$working_dir}
+
+sub create_working_dir {
+ if ( !-d $working_dir ) {
+ mkdir( $working_dir, 0700 )
+ or confess "Can't mkdir '$working_dir': $!";
+ }
+}
+
+# Verify that this user owns the working dir, then zap it. Returns true upon
+# success.
+sub remove_working_dir {
+ my $mode = ( stat $working_dir )[2];
+ return unless -d $working_dir;
+ $mode &= 07777;
+ return unless $mode == 0700;
+ rmtree $working_dir;
+ return 1;
+}
+
+# Return a location for a test invindex to be used by a single test file. If
+# the test file crashes it cannot clean up after itself, so we put the cleanup
+# routine in a single test file to be run at or near the end of the test
+# suite.
+sub test_invindex_loc {
+ return catdir( $working_dir, 'test_invindex' );
+}
+
+# Return a location for a test invindex intended to be shared by multiple
+# test files. It will be cleaned as above.
+sub persistent_test_invindex_loc {
+ return catdir( $working_dir, 'persistent_test_invindex' );
+}
+
+# Destroy anything left over in the test_invindex location, then create the
+# directory. Finally, return the path.
+sub init_test_invindex_loc {
+ my $dir = test_invindex_loc();
+ rmtree $dir;
+ die "Can't clean up '$dir'" if -e $dir;
+ mkdir $dir or die "Can't mkdir '$dir': $!";
+ return $dir;
+}
+
+# Build a RAMInvIndex, using the supplied array of strings as source material.
+# The invindex will have a single field: "content".
+sub create_invindex {
+ my @docs = @_;
+
+ my $folder = KinoSearch::Store::RAMFolder->new;
+ my $invindex = KinoSearch::InvIndex->clobber(
+ schema => KinoSearch::Test::TestSchema->new,
+ folder => $folder,
+ );
+
+ my $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex, );
+ $invindexer->add_doc( { content => $_ } ) for @docs;
+ $invindexer->finish;
+
+ return $invindex;
+}
+
+# Slurp us constitition docs and build hashrefs.
+sub get_uscon_docs {
+
+ my $uscon_dir = catdir( 'sample', 'us_constitution' );
+ opendir( my $uscon_dh, $uscon_dir )
+ or die "couldn't opendir '$uscon_dir': $!";
+ my @filenames = grep {/\.html$/} sort readdir $uscon_dh;
+ closedir $uscon_dh or die "couldn't closedir '$uscon_dir': $!";
+
+ my %docs;
+
+ for my $filename (@filenames) {
+ next if $filename eq 'index.html';
+ my $filepath = catfile( $uscon_dir, $filename );
+ open( my $fh, '<', $filepath )
+ or die "couldn't open file '$filepath': $!";
+ my $content = do { local $/; <$fh> };
+ $content =~ m#<title>(.*?)</title>#s
+ or die "couldn't isolate title in '$filepath'";
+ my $title = $1;
+ $content =~ m#<div id="bodytext">(.*?)</div><!--bodytext-->#s
+ or die "couldn't isolate bodytext in '$filepath'";
+ my $bodytext = $1;
+ $bodytext =~ s/<.*?>//sg;
+ $bodytext =~ s/\s+/ /sg;
+ my $category
+ = $filename =~ /art/ ? 'article'
+ : $filename =~ /amend/ ? 'amendment'
+ : $filename =~ /preamble/ ? 'preamble'
+ : confess "Can't derive category for $filename";
+
+ $docs{$filename} = {
+ title => $title,
+ bodytext => $bodytext,
+ url => "/us_constitution/$filename",
+ category => $category,
+ };
+ }
+
+ return \%docs;
+}
+
+sub create_uscon_invindex {
+ my $invindex = USConSchema->clobber( persistent_test_invindex_loc() );
+ my $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
+
+ $invindexer->add_doc( { content => "zz$_" } ) for ( 0 .. 10000 );
+ $invindexer->finish;
+ undef $invindexer;
+
+ $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
+ my $source_docs = get_uscon_docs();
+ $invindexer->add_doc( { content => $_->{bodytext} } )
+ for values %$source_docs;
+ $invindexer->finish;
+ undef $invindexer;
+
+ $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
+ my @chars = ( 'a' .. 'z' );
+ for ( 0 .. 1000 ) {
+ my $content = '';
+ for my $num_words ( 1 .. int( rand(20) ) ) {
+ for ( 1 .. ( int( rand(10) ) + 10 ) ) {
+ $content .= @chars[ rand(@chars) ];
+ }
+ $content .= ' ';
+ }
+ $invindexer->add_doc( { content => $content } );
+ }
+ $invindexer->finish( optimize => 1 );
+}
+
+# Return 3 strings useful for verifying UTF-8 integrity.
+sub utf8_test_strings {
+ my $smiley = "\x{263a}";
+ my $not_a_smiley = $smiley;
+ _utf8_off($not_a_smiley);
+ my $frowny = $not_a_smiley;
+ utf8::upgrade($frowny);
+ return ( $smiley, $not_a_smiley, $frowny );
+}
+
+# Verify an Analyzer's transform, transform_text, and split methods.
+sub test_analyzer {
+ my ( $analyzer, $source, $expected, $message ) = @_;
+
+ my $inversion = KinoSearch::Analysis::Inversion->new( text => $source );
+ $inversion = $analyzer->transform($inversion);
+ my @got;
+ while ( my $token = $inversion->next ) {
+ push @got, $token->get_text;
+ }
+ Test::More::is_deeply( \@got, $expected, "analyze: $message" );
+
+ $inversion = $analyzer->transform_text($source);
+ @got = ();
+ while ( my $token = $inversion->next ) {
+ push @got, $token->get_text;
+ }
+ Test::More::is_deeply( \@got, $expected, "transform_text: $message" );
+
+ @got = @{ $analyzer->split($source) };
+ Test::More::is_deeply( \@got, $expected, "split: $message" );
+}
+
+# Extract all doc nums from a TopDocCollector. Return two sorted array refs:
+# by_score and by_num.
+sub doc_nums_from_td_coll {
+ my $hc = shift;
+ my @by_score;
+ my $score_docs = $hc->get_hit_q->pop_all;
+ my @by_score_then_num = map { $_->get_doc_num }
+ sort {
+ $b->get_score <=> $a->get_score
+ || $a->get_doc_num <=> $b->get_doc_num
+ } @$score_docs;
+ my @by_num = sort { $a <=> $b } @by_score_then_num;
+ return ( \@by_score_then_num, \@by_num );
+}
+
+# Use a modulus to generate a set of numbers.
+sub modulo_set {
+ my ( $interval, $max ) = @_;
+ my @out;
+ for ( my $doc = $interval; $doc < $max; $doc += $interval ) {
+ push @out, $doc;
+ }
+ return \@out;
+}
+
+1;

Modified: trunk/perl/t/001-build_invindexes.t
===================================================================
--- trunk/perl/t/001-build_invindexes.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/001-build_invindexes.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -4,7 +4,7 @@

use Test::More tests => 4;
use File::Spec::Functions qw( catfile );
-use KinoTestUtils qw(
+use KinoSearch::Test::TestUtils qw(
working_dir
create_working_dir
remove_working_dir

Modified: trunk/perl/t/023-stepper.t
===================================================================
--- trunk/perl/t/023-stepper.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/023-stepper.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -4,7 +4,7 @@

use Test::More tests => 1;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );
use KinoSearch::Index::LexStepper;

my $invindex = create_invindex( 'a' .. 'c' );

Modified: trunk/perl/t/025-debug.t
===================================================================
--- trunk/perl/t/025-debug.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/025-debug.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -12,7 +12,7 @@
ASSERT
set_env_cache
);
-use KinoTestUtils qw( working_dir );
+use KinoSearch::Test::TestUtils qw( working_dir );

BEGIN {
if ( DEBUG_ENABLED() ) {

Modified: trunk/perl/t/029-charbuf.t
===================================================================
--- trunk/perl/t/029-charbuf.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/029-charbuf.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -7,7 +7,7 @@

use KinoSearch::Util::CharBuf;
use KinoSearch::Test::Util::TestCharBuf qw( vcatf_tests );
-use KinoTestUtils qw( utf8_test_strings );
+use KinoSearch::Test::TestUtils qw( utf8_test_strings );

my ( $smiley, $not_a_smiley, $frowny ) = utf8_test_strings();


Modified: trunk/perl/t/051-fsfile.t
===================================================================
--- trunk/perl/t/051-fsfile.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/051-fsfile.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::Store::OutStream;
use KinoSearch::Store::InStream;
use KinoSearch::Store::FSFolder;
-use KinoTestUtils qw( init_test_invindex_loc );
+use KinoSearch::Test::TestUtils qw( init_test_invindex_loc );

sub slurp_file {
my $path = shift;

Modified: trunk/perl/t/101-simple_io.t
===================================================================
--- trunk/perl/t/101-simple_io.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/101-simple_io.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -5,7 +5,7 @@
use Test::More tests => 27;

use KinoSearch::Store::RAMFolder;
-use KinoTestUtils qw( utf8_test_strings );
+use KinoSearch::Test::TestUtils qw( utf8_test_strings );
use KinoSearch::Util::StringHelper qw( utf8ify utf8_flag_off );

srand(2);

Modified: trunk/perl/t/105-folder.t
===================================================================
--- trunk/perl/t/105-folder.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/105-folder.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -10,7 +10,7 @@
use KinoSearch::Store::RAMFolder;
use KinoSearch::Store::FSFolder;
use KinoSearch::Store::Lock;
-use KinoTestUtils qw( init_test_invindex_loc );
+use KinoSearch::Test::TestUtils qw( init_test_invindex_loc );
use KinoSearch::Util::StringHelper qw( to_base36 );

my $fs_invindex_loc = init_test_invindex_loc();

Modified: trunk/perl/t/106-locking.t
===================================================================
--- trunk/perl/t/106-locking.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/106-locking.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -5,7 +5,7 @@
use Time::HiRes qw( sleep );
use Test::More;
use File::Spec::Functions qw( catfile );
-use KinoTestUtils qw( init_test_invindex_loc );
+use KinoSearch::Test::TestUtils qw( init_test_invindex_loc );

BEGIN {
if ( $^O =~ /mswin/i ) {

Modified: trunk/perl/t/107-index_file_names.t
===================================================================
--- trunk/perl/t/107-index_file_names.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/107-index_file_names.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -4,7 +4,7 @@

use Test::More tests => 3;
use KinoSearch::Index::IndexFileNames qw( unused_files );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );
use KinoSearch::Index::Snapshot;

my $invindex = create_invindex(qw( a b c ));

Modified: trunk/perl/t/108-invindex.t
===================================================================
--- trunk/perl/t/108-invindex.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/108-invindex.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -13,8 +13,8 @@
use KinoSearch::Store::FSFolder;
use KinoSearch::InvIndexer;
use KinoSearch::Searcher;
-use TestSchema;
-use KinoTestUtils qw( init_test_invindex_loc );
+use KinoSearch::Test::TestSchema;
+use KinoSearch::Test::TestUtils qw( init_test_invindex_loc );

my $fs_invindex_loc = init_test_invindex_loc();
my $fs_seg_file_loc = catfile( $fs_invindex_loc, 'snapshot_1.meta' );
@@ -23,7 +23,7 @@
clean_up_fs_invindex();

# Create a schema instance which we'll keep reusing.
-my $schema = TestSchema->new;
+my $schema = KinoSearch::Test::TestSchema->new;
my $invindex;
my $folder;


Modified: trunk/perl/t/109-read_locking.t
===================================================================
--- trunk/perl/t/109-read_locking.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/109-read_locking.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -20,8 +20,8 @@
use KinoSearch::InvIndexer;
use KinoSearch::Store::LockFactory;

-use TestSchema;
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestSchema;
+use KinoSearch::Test::TestUtils qw( create_invindex );

KinoSearch::Index::IndexFileNames::set_commit_lock_timeout(100);


Modified: trunk/perl/t/112-cf_writer.t
===================================================================
--- trunk/perl/t/112-cf_writer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/112-cf_writer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -7,7 +7,7 @@
use File::Spec::Functions qw( catfile );

use KinoSearch::Store::FSFolder;
-use KinoTestUtils qw( init_test_invindex_loc );
+use KinoSearch::Test::TestUtils qw( init_test_invindex_loc );

my $fs_invindex_loc = init_test_invindex_loc();
my $file_loc = catfile( $fs_invindex_loc, 'seg_99.biff' );

Modified: trunk/perl/t/113-cf_reader.t
===================================================================
--- trunk/perl/t/113-cf_reader.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/113-cf_reader.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::Util::Hash;
use JSON::XS qw( decode_json );

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex('a');
my $folder = $invindex->get_folder;

Modified: trunk/perl/t/150-polyanalyzer.t
===================================================================
--- trunk/perl/t/150-polyanalyzer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/150-polyanalyzer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -4,7 +4,7 @@

use Test::More tests => 15;

-use KinoTestUtils qw( test_analyzer );
+use KinoSearch::Test::TestUtils qw( test_analyzer );

use KinoSearch::Analysis::LCNormalizer;
use KinoSearch::Analysis::Tokenizer;

Modified: trunk/perl/t/151-analyzer.t
===================================================================
--- trunk/perl/t/151-analyzer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/151-analyzer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -5,7 +5,7 @@
use Test::More tests => 5;

use KinoSearch::Analysis::Analyzer;
-use KinoTestUtils qw( utf8_test_strings test_analyzer );
+use KinoSearch::Test::TestUtils qw( utf8_test_strings test_analyzer );

package TestAnalyzer;
use base qw( KinoSearch::Analysis::Analyzer );

Modified: trunk/perl/t/152-inversion.t
===================================================================
--- trunk/perl/t/152-inversion.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/152-inversion.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -7,7 +7,7 @@
use KinoSearch::Analysis::Inversion;
use KinoSearch::Analysis::Token;

-use KinoTestUtils qw( utf8_test_strings );
+use KinoSearch::Test::TestUtils qw( utf8_test_strings );

my $inversion = KinoSearch::Analysis::Inversion->new;
$inversion->append(

Modified: trunk/perl/t/153-lc_normalizer.t
===================================================================
--- trunk/perl/t/153-lc_normalizer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/153-lc_normalizer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -3,7 +3,7 @@
use lib 'buildlib';

use Test::More tests => 3;
-use KinoTestUtils qw( test_analyzer );
+use KinoSearch::Test::TestUtils qw( test_analyzer );

use KinoSearch::Analysis::LCNormalizer;
use KinoSearch::Analysis::Token;

Modified: trunk/perl/t/155-stopalizer.t
===================================================================
--- trunk/perl/t/155-stopalizer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/155-stopalizer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -3,7 +3,7 @@
use lib 'buildlib';

use Test::More tests => 6;
-use KinoTestUtils qw( test_analyzer );
+use KinoSearch::Test::TestUtils qw( test_analyzer );

use KinoSearch::Analysis::Stopalizer;
use KinoSearch::Analysis::Tokenizer;

Modified: trunk/perl/t/156-stemmer.t
===================================================================
--- trunk/perl/t/156-stemmer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/156-stemmer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -3,7 +3,7 @@
use lib 'buildlib';

use Test::More tests => 6;
-use KinoTestUtils qw( test_analyzer );
+use KinoSearch::Test::TestUtils qw( test_analyzer );

use KinoSearch::Analysis::Stemmer;
use KinoSearch::Analysis::Tokenizer;

Modified: trunk/perl/t/205-seg_reader.t
===================================================================
--- trunk/perl/t/205-seg_reader.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/205-seg_reader.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -6,7 +6,7 @@

use KinoSearch::Index::IndexReader;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex(
"What's he building in there?",

Modified: trunk/perl/t/206-seg_infos.t
===================================================================
--- trunk/perl/t/206-seg_infos.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/206-seg_infos.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -5,7 +5,7 @@
use Test::More tests => 1;

use KinoSearch::Index::Snapshot;
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( "a", "a b" );


Modified: trunk/perl/t/209-seg_lexicon_heavy.t
===================================================================
--- trunk/perl/t/209-seg_lexicon_heavy.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/209-seg_lexicon_heavy.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -7,7 +7,7 @@
use KinoSearch::Index::LexReader;
use KinoSearch::Index::Snapshot;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my @docs;
my @chars = ( 'a' .. 'z' );

Modified: trunk/perl/t/210-deldocs.t
===================================================================
--- trunk/perl/t/210-deldocs.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/210-deldocs.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -6,8 +6,8 @@

use KinoSearch::Index::DelDocs;

-use KinoTestUtils qw( create_invindex );
-use TestSchema;
+use KinoSearch::Test::TestUtils qw( create_invindex );
+use KinoSearch::Test::TestSchema;

use KinoSearch::Index::SegInfo;
use KinoSearch::Index::Snapshot;
@@ -71,7 +71,7 @@
is( $deldocs->get_cap, 8, "write_deldocs wrote correct number of bytes" );

$folder = KinoSearch::Store::RAMFolder->new;
-$schema = TestSchema->new;
+$schema = KinoSearch::Test::TestSchema->new;
$invindex = KinoSearch::InvIndex->clobber(
folder => $folder,
schema => $schema,

Modified: trunk/perl/t/211-seg_posting_list.t
===================================================================
--- trunk/perl/t/211-seg_posting_list.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/211-seg_posting_list.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::InvIndexer;
use KinoSearch::Store::RAMFolder;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( qw( a b c ), 'c c d' );
my $reader = KinoSearch::Index::IndexReader->open( invindex => $invindex );
@@ -39,7 +39,7 @@
$plist->set_doc_base(0);

$invindex = KinoSearch::InvIndex->open(
- schema => TestSchema->new,
+ schema => KinoSearch::Test::TestSchema->new,
folder => KinoSearch::Store::RAMFolder->new,
);


Modified: trunk/perl/t/213-segment_merging.t
===================================================================
--- trunk/perl/t/213-segment_merging.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/213-segment_merging.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -7,7 +7,7 @@
# when an invindex created under TestSchema is opened/modified under
# BiggerSchema.
package BiggerSchema;
-use base qw( TestSchema );
+use base qw( KinoSearch::Test::TestSchema );
use KinoSearch::Analysis::Tokenizer;

our %fields = (
@@ -26,8 +26,8 @@
use KinoSearch::Index::IndexReader;
use KinoSearch::Store::RAMFolder;

-use TestSchema;
-use KinoTestUtils qw( create_invindex init_test_invindex_loc );
+use KinoSearch::Test::TestSchema;
+use KinoSearch::Test::TestUtils qw( create_invindex init_test_invindex_loc );

{ # Wrap script in a block, so we can test object destruction at end.

@@ -37,7 +37,7 @@
my $folder = KinoSearch::Store::RAMFolder->new;
$invindex = KinoSearch::InvIndex->clobber(
folder => $folder,
- schema => TestSchema->new,
+ schema => KinoSearch::Test::TestSchema->new,
);
for ( my $num_reps = 1;; $num_reps++ ) {
$invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
@@ -59,12 +59,12 @@
}

my $invindex_loc = init_test_invindex_loc();
- TestSchema->clobber($invindex_loc);
+ KinoSearch::Test::TestSchema->clobber($invindex_loc);

sub init_invindexer {
undef $invindex;
undef $invindexer;
- $invindex = TestSchema->open($invindex_loc);
+ $invindex = KinoSearch::Test::TestSchema->open($invindex_loc);
$invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
}

@@ -81,7 +81,7 @@
}

$searcher = KinoSearch::Searcher->new(
- invindex => TestSchema->read($invindex_loc) );
+ invindex => KinoSearch::Test::TestSchema->read($invindex_loc) );
$hits = $searcher->search( query => 'b' );
is( $hits->total_hits, 10, "correct total_hits from merged invindex" );
my @got;

Modified: trunk/perl/t/216-schema.t
===================================================================
--- trunk/perl/t/216-schema.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/216-schema.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -18,7 +18,7 @@

package main;
use Test::More tests => 9;
-use TestSchema;
+use KinoSearch::Test::TestSchema;

my $schema;

@@ -31,28 +31,28 @@
eval { $schema = NoAnalyzerSchema->new };
like( $@, qr/abstract/i, "Failing to define analyzer errors out" );

- $schema = TestSchema->new;
+ $schema = KinoSearch::Test::TestSchema->new;
eval { $schema->add_field( field => 'foo', spec => 'NotAFieldSpec' ) };
Test::More::like( $@, qr/NotAFieldSpec/,
"bogus FieldSpec fails to load" );

- $schema = TestSchema->new;
+ $schema = KinoSearch::Test::TestSchema->new;
eval { $schema->add_field( field => 'foo', spec => 'lowcaseonly' ) };
Test::More::like( $@, qr/lower/, "lower case name reserved" );
}

-$schema = TestSchema->new;
+$schema = KinoSearch::Test::TestSchema->new;
$schema->add_field( field => 'new_field', spec => 'text' );
my $got = grep { $_ eq 'new_field' } @{ $schema->all_fields };
ok( $got, 'add_field works' );
is( $schema->field_num('content'), 1, "field_num" );
is( $schema->field_num('new_field'), 2, "new field_num" );

-$schema = TestSchema->new;
+$schema = KinoSearch::Test::TestSchema->new;
eval { $schema->add_field( field => 'kinobogus', spec => 'text' ) };
Test::More::like( $@, qr/reserved/, "name starting with kino errors out" );

-$schema = TestSchema->new;
+$schema = KinoSearch::Test::TestSchema->new;
eval {
$schema->add_field(
field => 'foo',

Modified: trunk/perl/t/304-verify_utf8.t
===================================================================
--- trunk/perl/t/304-verify_utf8.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/304-verify_utf8.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -18,7 +18,7 @@
use KinoSearch::InvIndex;
use KinoSearch::Store::RAMFolder;
use KinoSearch::Search::TermQuery;
-use KinoTestUtils qw( utf8_test_strings );
+use KinoSearch::Test::TestUtils qw( utf8_test_strings );

my ( $smiley, $not_a_smiley, $frowny ) = utf8_test_strings();


Modified: trunk/perl/t/305-invindexer.t
===================================================================
--- trunk/perl/t/305-invindexer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/305-invindexer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,13 +9,13 @@
use KinoSearch::InvIndex;
use KinoSearch::Store::LockFactory;

-use TestSchema;
+use KinoSearch::Test::TestSchema;

my $folder = KinoSearch::Store::RAMFolder->new;
-my $schema = TestSchema->new;
+my $schema = KinoSearch::Test::TestSchema->new;

my $invindex = KinoSearch::InvIndex->clobber(
- schema => TestSchema->new,
+ schema => KinoSearch::Test::TestSchema->new,
folder => $folder,
);


Modified: trunk/perl/t/306-dynamic_schema.t
===================================================================
--- trunk/perl/t/306-dynamic_schema.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/306-dynamic_schema.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -2,7 +2,7 @@
use warnings;
use lib 'buildlib';

-use TestSchema;
+use KinoSearch::Test::TestSchema;
use Test::More tests => 9;
use KinoSearch::Store::RAMFolder;
use KinoSearch::Analysis::Tokenizer;
@@ -10,7 +10,7 @@
use KinoSearch::InvIndex;
use KinoSearch::Searcher;

-my $schema = TestSchema->new;
+my $schema = KinoSearch::Test::TestSchema->new;
my $folder = KinoSearch::Store::RAMFolder->new;
my $invindex = KinoSearch::InvIndex->clobber(
schema => $schema,
@@ -53,7 +53,7 @@
is_deeply( $top_hit->get_fields, \%three_fields,
"all fields stored successfully" );

-my $schema2 = TestSchema->new;
+my $schema2 = KinoSearch::Test::TestSchema->new;
my $folder2 = KinoSearch::Store::RAMFolder->new;
my $invindex2 = KinoSearch::InvIndex->clobber(
schema => $schema2,

Modified: trunk/perl/t/308-simple.t
===================================================================
--- trunk/perl/t/308-simple.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/308-simple.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -4,7 +4,7 @@

use Test::More tests => 8;
use KSx::Simple;
-use KinoTestUtils qw( init_test_invindex_loc );
+use KinoSearch::Test::TestUtils qw( init_test_invindex_loc );

my $test_invindex_loc = init_test_invindex_loc();


Modified: trunk/perl/t/501-termquery.t
===================================================================
--- trunk/perl/t/501-termquery.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/501-termquery.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -8,7 +8,7 @@
use KinoSearch::Searcher;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( 'a', 'b', 'c c c d', 'c d', 'd' .. 'z', );
my $searcher = KinoSearch::Searcher->new( invindex => $invindex );

Modified: trunk/perl/t/502-phrasequery.t
===================================================================
--- trunk/perl/t/502-phrasequery.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/502-phrasequery.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -8,7 +8,7 @@
use KinoSearch::Search::PhraseQuery;
use KinoSearch::Searcher;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $best_match = 'x a b c d a b c d';


Modified: trunk/perl/t/507-filter.t
===================================================================
--- trunk/perl/t/507-filter.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/507-filter.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -8,12 +8,13 @@
use KinoSearch::Searcher;
use KinoSearch::Search::TermQuery;
use KSx::Search::Filter;
-use TestSchema;
+use KinoSearch::Test::TestSchema;
use Storable qw( nfreeze thaw );

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

-my $query_parser = KinoSearch::QueryParser->new( schema => TestSchema->new );
+my $query_parser = KinoSearch::QueryParser->new(
+ schema => KinoSearch::Test::TestSchema->new );

## Set up main objects.
my ( $filter_1, $filter_2 );

Modified: trunk/perl/t/508-hits.t
===================================================================
--- trunk/perl/t/508-hits.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/508-hits.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -6,7 +6,7 @@

use KinoSearch::Search::Hits;
use KinoSearch::Searcher;
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my @docs = ( 'a b', 'a a b', 'a a a b', 'x' );
my $invindex = create_invindex(@docs);

Modified: trunk/perl/t/509-multi_searcher.t
===================================================================
--- trunk/perl/t/509-multi_searcher.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/509-multi_searcher.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -8,9 +8,9 @@
use KinoSearch::Searcher;
use KinoSearch::Analysis::Tokenizer;
use KinoSearch::Search::HitCollector;
-use TestSchema;
+use KinoSearch::Test::TestSchema;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );
my $invindex_a = create_invindex( 'x a', 'x b', 'x c' );
my $invindex_b = create_invindex( 'y b', 'y c', 'y d' );

@@ -20,7 +20,7 @@
my $searcher_b = KinoSearch::Searcher->new( invindex => $invindex_b, );

my $multi_searcher = KinoSearch::Search::MultiSearcher->new(
- schema => TestSchema->new,
+ schema => KinoSearch::Test::TestSchema->new,
searchables => [ $searcher_a, $searcher_b ],
);


Modified: trunk/perl/t/514-and_scorer.t
===================================================================
--- trunk/perl/t/514-and_scorer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/514-and_scorer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -8,7 +8,7 @@
use KinoSearch::Search::Similarity;
use KSx::Search::MockScorer;
use KinoSearch::Search::HitCollector::TopDocCollector;
-use KinoTestUtils qw( modulo_set doc_nums_from_td_coll );
+use KinoSearch::Test::TestUtils qw( modulo_set doc_nums_from_td_coll );

my $sim = KinoSearch::Search::Similarity->new;


Modified: trunk/perl/t/518-or_scorer.t
===================================================================
--- trunk/perl/t/518-or_scorer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/518-or_scorer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -8,7 +8,7 @@
use KinoSearch::Search::Similarity;
use KSx::Search::MockScorer;
use KinoSearch::Search::HitCollector::TopDocCollector;
-use KinoTestUtils qw( modulo_set doc_nums_from_td_coll );
+use KinoSearch::Test::TestUtils qw( modulo_set doc_nums_from_td_coll );

my $sim = KinoSearch::Search::Similarity->new;


Modified: trunk/perl/t/519-req_opt_scorer.t
===================================================================
--- trunk/perl/t/519-req_opt_scorer.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/519-req_opt_scorer.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -8,7 +8,7 @@
use KSx::Search::MockScorer;
use KinoSearch::Search::Similarity;
use KinoSearch::Search::HitCollector::TopDocCollector;
-use KinoTestUtils qw( modulo_set doc_nums_from_td_coll );
+use KinoSearch::Test::TestUtils qw( modulo_set doc_nums_from_td_coll );

my $sim = KinoSearch::Search::Similarity->new;


Modified: trunk/perl/t/523-and_query.t
===================================================================
--- trunk/perl/t/523-and_query.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/523-and_query.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::Searcher;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( 'a', 'b', 'c c c d', 'c d', 'd' .. 'z', );
my $searcher = KinoSearch::Searcher->new( invindex => $invindex );

Modified: trunk/perl/t/524-poly_query.t
===================================================================
--- trunk/perl/t/524-poly_query.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/524-poly_query.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -10,7 +10,7 @@
use KinoSearch::Searcher;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( 'a', 'b', 'c c c d', 'c d', 'd' .. 'z', );
my $searcher = KinoSearch::Searcher->new( invindex => $invindex );

Modified: trunk/perl/t/525-match_all_query.t
===================================================================
--- trunk/perl/t/525-match_all_query.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/525-match_all_query.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::Searcher;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( 'a' .. 'z' );
my $searcher = KinoSearch::Searcher->new( invindex => $invindex );

Modified: trunk/perl/t/526-not_query.t
===================================================================
--- trunk/perl/t/526-not_query.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/526-not_query.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -12,7 +12,7 @@
use KSx::Search::MockScorer;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my @got;


Modified: trunk/perl/t/527-req_opt_query.t
===================================================================
--- trunk/perl/t/527-req_opt_query.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/527-req_opt_query.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::Searcher;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( 'a', 'b', 'b c', 'c', 'c d', 'd', 'e' );
my $searcher = KinoSearch::Searcher->new( invindex => $invindex );

Modified: trunk/perl/t/528-leaf_query.t
===================================================================
--- trunk/perl/t/528-leaf_query.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/528-leaf_query.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::Searcher;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( 'a', 'b', 'b c', 'c', 'c d', 'd', 'e' );
my $searcher = KinoSearch::Searcher->new( invindex => $invindex );

Modified: trunk/perl/t/529-no_match_query.t
===================================================================
--- trunk/perl/t/529-no_match_query.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/529-no_match_query.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -9,7 +9,7 @@
use KinoSearch::Searcher;

use Storable qw( freeze thaw );
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( 'a' .. 'z' );
my $searcher = KinoSearch::Searcher->new( invindex => $invindex );

Modified: trunk/perl/t/601-queryparser.t
===================================================================
--- trunk/perl/t/601-queryparser.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/601-queryparser.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -38,7 +38,7 @@
use KinoSearch::Store::RAMFolder;
use KinoSearch::Util::StringHelper qw( utf8_flag_on utf8ify );

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $folder = KinoSearch::Store::RAMFolder->new;
my $stop_folder = KinoSearch::Store::RAMFolder->new;

Modified: trunk/perl/t/603-query_boosts.t
===================================================================
--- trunk/perl/t/603-query_boosts.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/603-query_boosts.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -4,7 +4,7 @@

use Test::More tests => 2;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

use KinoSearch::Searcher;
use KinoSearch::InvIndexer;

Modified: trunk/perl/t/605-store_pos_boost.t
===================================================================
--- trunk/perl/t/605-store_pos_boost.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/605-store_pos_boost.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -61,7 +61,7 @@

package main;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );
use Test::More tests => 2;

use KinoSearch::Searcher;

Modified: trunk/perl/t/606-proximity.t
===================================================================
--- trunk/perl/t/606-proximity.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/606-proximity.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -2,7 +2,7 @@
use warnings;
use lib 'buildlib';

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );
use Test::More tests => 1;

use KinoSearch::Searcher;

Modified: trunk/perl/t/607-queryparser_multi_field.t
===================================================================
--- trunk/perl/t/607-queryparser_multi_field.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/607-queryparser_multi_field.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -29,7 +29,7 @@
use KinoSearch::Searcher;
use KinoSearch::Store::RAMFolder;

-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $folder = KinoSearch::Store::RAMFolder->new;
my $schema = MultiFieldSchema->new;

Modified: trunk/perl/t/610-queryparser_logic.t
===================================================================
--- trunk/perl/t/610-queryparser_logic.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/610-queryparser_logic.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -6,7 +6,7 @@

use KinoSearch::Test::TestQueryParser qw( doc_set );
use KinoSearch::Test::TestQueryParserLogic;
-use KinoTestUtils qw( create_invindex );
+use KinoSearch::Test::TestUtils qw( create_invindex );

my $invindex = create_invindex( @{ doc_set() } );


Modified: trunk/perl/t/701-uscon.t
===================================================================
--- trunk/perl/t/701-uscon.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/701-uscon.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -7,7 +7,7 @@

use KinoSearch::Searcher;

-use KinoTestUtils qw( persistent_test_invindex_loc );
+use KinoSearch::Test::TestUtils qw( persistent_test_invindex_loc );
use USConSchema;

my $searcher = KinoSearch::Searcher->new(

Modified: trunk/perl/t/999-remove_invindexes.t
===================================================================
--- trunk/perl/t/999-remove_invindexes.t 2008-09-06 16:34:10 UTC (rev 3824)
+++ trunk/perl/t/999-remove_invindexes.t 2008-09-06 18:56:04 UTC (rev 3825)
@@ -3,7 +3,7 @@
use lib 'buildlib';

use Test::More tests => 1;
-use KinoTestUtils qw( remove_working_dir working_dir );
+use KinoSearch::Test::TestUtils qw( remove_working_dir working_dir );

remove_working_dir();
ok( !-e working_dir(), "working_dir is no more" );


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits