Blame t/10_make.t

Packit f92f8e
#!/usr/bin/perl -Tw
Packit f92f8e
Packit f92f8e
use strict;
Packit f92f8e
use Test::More tests => 5;
Packit f92f8e
Packit f92f8e
BEGIN {
Packit f92f8e
    use_ok( 'Locale::Maketext' );
Packit f92f8e
}
Packit f92f8e
Packit f92f8e
# declare some classes...
Packit f92f8e
{
Packit f92f8e
  package Woozle;
Packit f92f8e
  our @ISA = ('Locale::Maketext');
Packit f92f8e
  sub dubbil   { return $_[1] * 2 }
Packit f92f8e
  sub numerate { return $_[2] . 'en' }
Packit f92f8e
}
Packit f92f8e
{
Packit f92f8e
  package Woozle::elx;
Packit f92f8e
  our @ISA = ('Woozle');
Packit f92f8e
  our %Lexicon = (
Packit f92f8e
   'd2' => 'hum [dubbil,_1]',
Packit f92f8e
   'd3' => 'hoo [quant,_1,zaz]',
Packit f92f8e
   'd4' => 'hoo [*,_1,zaz]',
Packit f92f8e
  );
Packit f92f8e
  keys %Lexicon; # dodges the 'used only once' warning
Packit f92f8e
}
Packit f92f8e
Packit f92f8e
my $lh = Woozle->get_handle('elx');
Packit f92f8e
isa_ok( $lh, 'Woozle::elx' );
Packit f92f8e
Packit f92f8e
is( $lh->maketext('d2', 7), 'hum 14' );
Packit f92f8e
is( $lh->maketext('d3', 7), 'hoo 7 zazen' );
Packit f92f8e
is( $lh->maketext('d4', 7), 'hoo 7 zazen' );