Acme-MetaSyntactic
view release on metacpan or search on metacpan
use strict;
use Test::More;
use Acme::MetaSyntactic;
use lib 't/lib';
use NoLang;
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
plan tests => 11;
LIST: {
my $meta = Acme::MetaSyntactic->new('test_ams_list');
my %seen;
my @names = $meta->name;
is( scalar @names, 1, "name() returned a single item" );
t/11namespace.t view on Meta::CPAN
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
use Test::More tests => 1;
use Acme::MetaSyntactic::test_ams_list;
# check that metaname is not exported into Acme::MetaSyntactic::List
ok(
!exists $Acme::MetaSyntactic::List::{metaname},
"metaname not exported to AMS::List"
);
use Test::More;
use strict;
use lib 't/lib';
use NoLang;
use Acme::MetaSyntactic;
plan tests => 2;
# the default list
no warnings;
my @names = metaname();
my %seen = map { $_ => 1 } @{$Acme::MetaSyntactic::foo::MultiList{en}};
ok( exists $seen{$names[0]}, "metaname" );
t/16import.t view on Meta::CPAN
use Test::More;
use strict;
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
use Acme::MetaSyntactic 'test_ams_list';
plan tests => 4;
my @names = metaname();
my %seen = map { $_ => 1 } @Acme::MetaSyntactic::test_ams_list::List;
ok( exists $seen{$names[0]}, "metaname" );
my @bots = qw( purl url sarko bender );
my $meta = Acme::MetaSyntactic->new( 'bots' );
t/20theme.t view on Meta::CPAN
use strict;
use Test::More;
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
use Acme::MetaSyntactic;
plan tests => 15;
my @bots = qw( purl url sarko bender );
my $meta = Acme::MetaSyntactic->new( 'bots' );
# existing themes
my @themes = Acme::MetaSyntactic->themes;
use Test::More;
use Acme::MetaSyntactic::any;
use lib 't/lib';
use NoLang;
# "alter" the shuffle method
{
no warnings;
my ( $i, $j ) = ( 0, 0 );
*List::Util::shuffle = sub { sort @_ }; # item selection
*Acme::MetaSyntactic::any::shuffle = # theme selection
sub (@) { my @t = sort @_; push @t, shift @t for 1 .. $j; $j++; @t };
}
t/33locale.t view on Meta::CPAN
use Test::More;
use lib 't/lib';
use NoLang;
use strict;
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
use Acme::MetaSyntactic::test_ams_locale;
my @langs = Acme::MetaSyntactic::test_ams_locale->languages();
plan tests => 4 * ( @langs + 2 ) + 7;
is_deeply(
[ sort @langs ],
[qw( en fr it x-chiendent yi )],
"All languages (class)"
t/33locale_territory.t view on Meta::CPAN
use Test::More;
use strict;
use lib 't/lib';
use NoLang;
use Acme::MetaSyntactic;
my %tests = (
'en' => ['seventy'],
'fr_BE.iso-8859-1' => ['septante'],
'fr_be' => ['septante'],
'fr_BE' => ['septante'],
'fr_BE_zlonk.utf8' => ['septante'],
'fr_CH' => [ 'septante', 'soixante_dix' ],
t/33locale_win32.t view on Meta::CPAN
use Test::More;
use lib 't/lib';
use NoLang;
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
use Acme::MetaSyntactic::test_ams_locale;
plan tests => 1;
# Windows or not, I do not care
unshift @INC, sub {
my (undef, $file) = @_;
if ($file eq 'Win32/Locale.pm') {
my @code = ("0;");
t/35remote.t view on Meta::CPAN
use Test::More tests => 19;
use strict;
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
{ eval "require LWP::UserAgent;"; }
my $has_lwp = !$@;
# test the helper subs
is( Acme::MetaSyntactic::RemoteList::tr_accent('a é ö ì À + ='),
'a e o i A + =', 'tr_accent' );
is( Acme::MetaSyntactic::RemoteList::tr_nonword('a;Aö"1À +='),
'a_A__1____', 'tr_nonword' );
use Test::More tests => 1;
use File::Spec::Functions;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
# look for themes in all @INC
use_ok( 'Acme::MetaSyntactic::test_ams_list' );
t/50usecase.t view on Meta::CPAN
use strict;
use Test::More;
use File::Spec::Functions;
use File::Glob;
my $dir;
BEGIN { $dir = catdir qw( t lib ); }
use lib $dir;
my @list_cases = File::Glob::bsd_glob catfile(qw(t usecase_list*));
my @locale_fr_cases = File::Glob::bsd_glob catfile(qw(t usecase_locale_fr*));
my @locale_en_cases = File::Glob::bsd_glob catfile(qw(t usecase_locale_en*));
my @alias_cases = File::Glob::bsd_glob catfile(qw(t usecase_alias*));
plan tests => 2
* ( @list_cases + @locale_fr_cases + @locale_en_cases + @alias_cases );
LIST: {
( run in 0.335 second using v1.01-cache-2.11-cpan-87723dcf8b7 )