/[jsFind]/trunk/t/10homer.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/10homer.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/t/10ulyss.pl revision 20 by dpavlin, Mon Oct 4 19:51:05 2004 UTC trunk/t/10homer.pl revision 21 by dpavlin, Wed Oct 6 15:33:33 2004 UTC
# Line 12  BEGIN { use_ok('jsFind'); } Line 12  BEGIN { use_ok('jsFind'); }
12    
13  my $t = new jsFind B => 100;  my $t = new jsFind B => 100;
14    
15  ok(-e "t/ulyss12.txt", "The Project Gutenberg EBook of Ulysses, by James Joyce");  ok(-e "t/homer.txt", "Homer: The Odyssey preface");
16    
17  my $p = 0;  my $p = 0;
18  my $text = '';  my $text = '';
19  my %words;  my %words;
20  my $max = 1;  my $max = 2;
21    
22  my $res;  my $res;
23    
24  ok(open(U, "t/ulyss12.txt"), "open ulyss12.txt");  ok(open(U, "t/homer.txt"), "open homer.txt");
25  while(<U>) {  while(<U>) {
26          chomp;          chomp;
27          if (/^\s*$/) {          if (/^\s*$/) {
# Line 78  ok($test_data, "test_data saved"); Line 78  ok($test_data, "test_data saved");
78    
79  my $total_words = scalar keys %words;  my $total_words = scalar keys %words;
80    
81  cmp_ok($t->to_jsfind("./html/ulyss"), '==', $total_words, " jsfind index with $total_words words");  cmp_ok($t->to_jsfind("./html/homer"), '==', $total_words, " jsfind index with $total_words words");

Legend:
Removed from v.20  
changed lines
  Added in v.21

  ViewVC Help
Powered by ViewVC 1.1.26