diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-27 13:50:57 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-27 13:50:57 +0000 |
commit | 9378c5814a1c38be33358baa5cfd56712c3b71d4 (patch) | |
tree | 712d3a8e3142e76139998b3f83f430343ce1e173 /t/lib | |
parent | 4b053158ffba5bda82094dc0b0cd80c9d2867b97 (diff) | |
download | perl-9378c5814a1c38be33358baa5cfd56712c3b71d4.tar.gz |
Integrate Locale::Maketext 1.01 from Sean Burke.
p4raw-id: //depot/perl@10229
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/lc-maketext.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/t/lib/lc-maketext.t b/t/lib/lc-maketext.t new file mode 100644 index 0000000000..743d8eecbd --- /dev/null +++ b/t/lib/lc-maketext.t @@ -0,0 +1,37 @@ +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + +BEGIN { $| = 1; print "1..3\n"; } +END {print "not ok 1\n" unless $loaded;} +use Locale::Maketext 1.01; +print "# Perl v$], Locale::Maketext v$Locale::Maketext::VERSION\n"; +$loaded = 1; +print "ok 1\n"; +{ + package Woozle; + @ISA = ('Locale::Maketext'); + sub dubbil { return $_[1] * 2 } +} +{ + package Woozle::elx; + @ISA = ('Woozle'); + %Lexicon = ( + 'd2' => 'hum [dubbil,_1]', + ); +} + +$lh = Woozle->get_handle('elx'); +if($lh) { + print "ok 2\n"; + my $x = $lh->maketext('d2', 7); + if($x eq "hum 14") { + print "ok 3\n"; + } else { + print "not ok 3\n (got \"$x\")\n"; + } +} else { + print "not ok 2\n"; +} +#Shazam! |