1#!/usr/bin/perl -w
2
3use strict;
4
5BEGIN { $| = 1; print "1..2\n"; }
6
7END {print "not ok 1\n" unless $::loaded_hyphen;}
8
9eval 'use locale;';
10
11use Benchmark;
12use TeX::Hyphen;
13
14$::loaded_hyphen = 1;
15print "ok 1\n";
16
17my $hyp = new TeX::Hyphen;
18
19my $t1 = new Benchmark;
20my $file = 'lib/TeX/Hyphen.pm';
21my $size = -s $file;
22print STDERR "\nWill hyphenate file $file (size $size bytes)\n";
23
24open README, $file or die "Error reading $file";
25my $line;
26while (defined($line = <README>)) {
27	last if $line =~ /^__/;
28	for (split /\W+/, $line) {
29		$hyp->hyphenate($_);
30	}
31}
32close README;
33my $t2 = new Benchmark;
34my $td = timediff($t2, $t1);
35print STDERR "the code took:",timestr($td),"\n";
36
37print "ok 2\n";
38
39