1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl test.pl'
3 # Time-stamp: "2001-06-20 02:12:53 MDT"
4 ######################### We start with some black magic to print on failure.
6 # (It may become useful if the test is moved to ./t subdirectory.)
8 BEGIN { $| = 1; print "1..5\n"; }
9 END {print "fail 1\n" unless $loaded;}
10 use Locale::Maketext 1.01;
11 print "# Perl v$], Locale::Maketext v$Locale::Maketext::VERSION\n";
16 @ISA = ('Locale::Maketext');
17 sub dubbil { return $_[1] * 2 }
18 sub numerate { return $_[2] . 'en' }
24 'd2' => 'hum [dubbil,_1]',
25 'd3' => 'hoo [quant,_1,zaz]',
26 'd4' => 'hoo [*,_1,zaz]',
30 $lh = Woozle->get_handle('elx');
36 $x = $lh->maketext('d2', 7);
40 print "fail 3 # (got \"$x\")\n";
43 $x = $lh->maketext('d3', 7);
44 if($x eq "hoo 7 zazen") {
47 print "fail 4 # (got \"$x\")\n";
50 $x = $lh->maketext('d4', 7);
51 if($x eq "hoo 7 zazen") {
54 print "fail 5 # (got \"$x\")\n";