Changeset 2094 for Swishetest/trunk

Show
Ignore:
Timestamp:
03/19/08 20:35:31 (10 months ago)
Author:
joshr
Message:

use only the smaller (linux) dictionary for this test now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Swishetest/trunk/t/030-C030-medsm-xml.t

    r2040 r2094  
    2424    # predict number of tests based on number of files in dictionaries and number of index types 
    2525 
    26     # ONE ORDER 
    27     my @dicts = qw( data/C020-words-txt/words-linux-fc1.txt data/C020-words-txt/words-osx-10_3.txt); 
     26    #my @dicts = qw( data/C020-words-txt/words-linux-fc1.txt data/C020-words-txt/words-osx-10_3.txt); 
     27    #my @dicts = qw( data/C020-words-txt/words-osx-10_3.txt);    # skip smaller linux words list 
     28    my @dicts = qw( data/C020-words-txt/words-linux-fc1.txt );  # skip larger osx words list 
    2829 
    29     # THE OTHER ORDER 
    30     #my @dicts = qw( data/C020-words-txt/words-osx-10_3.txt data/C020-words-txt/words-linux-fc1.txt ); 
    3130 
    3231    my @dictwordcounts = map { `wc -l $_ | awk '{print \$1}' ` } @dicts; 
    3332    chomp(@dictwordcounts); 
    3433    my $numdictwords = sum( @dictwordcounts ); 
    35     #my @filetypes = qw(html xml txt); 
    36     my @filetypes = qw(txt xml html); 
     34 
     35    my @filetypes = qw(txt xml html);   # simpler to more complex 
    3736    my $numdicts = scalar(@dicts); 
    3837    my $numfiletypes = scalar(@filetypes); 
    3938    my $totalnumtests = $numfiletypes * $numdictwords + scalar(@dicts) * scalar(@filetypes) * 3; 
    40     # three tests plus one for each word, for each dictionary and filetype. 
    41     #plan tests => ($numdicts * $numfiletypes * (3 + $max_words )); 
    4239    plan tests => $totalnumtests; 
    4340    mkpath( ["blib/index"], 0, 0755); 
    4441    my $base = "C030"; 
    4542    for my $dict (@dicts) { 
     43        ( my $dictname = $dict ) =~ s/^.*-(([^.]|-)+)\.txt$/$1/; 
    4644        for my $filetype ( @filetypes ) { 
    47             ( my $dictname = $dict ) =~ s/^.*-(([^.]|-)+)\.txt$/$1/; 
    48             #( my $dictname = $dict ) =~ s/\.txt$//;    # this doesn't work 
    49             #$dictname =~ s![^/]*/!!;   # this doesn't work 
    5045 
    5146            my $index = "blib/index/${base}_${dictname}_${filetype}.index"; 
     
    7267                #    ($word =~ /^\s*(and|or|not|near)\s*$/i) ? 0 : ($word_count->{lc($word)} || 1)); 
    7368                my $num_expected_rows = $word_count->{lc($word)}; 
    74                 cmp_ok(scalar(@rows), "==", $num_expected_rows, "search '$word' ($filetype index from $dict)"); 
     69                cmp_ok(scalar(@rows), "==", $num_expected_rows, "'$word' ($filetype/$dictname)"); 
    7570            } 
    7671            DoSearch::close_index($index);