10 |
|
|
11 |
BEGIN { use_ok('jsFind'); } |
BEGIN { use_ok('jsFind'); } |
12 |
|
|
13 |
my $t = new jsFind B => 100; |
my $t = new jsFind B => 200; |
14 |
|
|
15 |
ok(-e "t/homer.txt", "Homer: The Odyssey preface"); |
my $file = shift @ARGV || 't/homer.txt'; |
16 |
|
|
17 |
|
ok(-e $file, "reading input file $file"); |
18 |
|
|
19 |
my $line = 0; |
my $line = 0; |
20 |
my $text = ''; |
my $text = ''; |
27 |
|
|
28 |
my $full_text; |
my $full_text; |
29 |
|
|
30 |
ok(open(U, "t/homer.txt"), "open homer.txt"); |
ok(open(U, $file), "open $file"); |
31 |
while(<U>) { |
while(<U>) { |
32 |
chomp; |
chomp; |
33 |
$line++; |
$line++; |