Acme-Time-Baby

 view release on metacpan or  search on metacpan

t/00_en.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 + 1 };
use Acme::Time::Baby;
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /one two three four five six seven eight
                                   nine ten eleven twelve/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~    /big hand is on the (\w+)/;
        my ($little) = $r =~ /little hand is on the (\w+)/;

        if (!defined $big || !defined $little) {
            print "# $hours:$minutes -> $r\n";

t/01_du.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'du';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /een twee drie vier vijf zes zeven acht
                                   negen tien elf twaalf/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~  /grote wijzer is op de (\w+)/;
        my ($little) = $r =~ /kleine wijzer is op de (\w+)/;

        if (!defined $big || !defined $little) {
            print "# $hours:$minutes -> $r\n";

t/02_custom.t  view on Meta::CPAN

use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby numbers => [qw /i ii iii iv v vi vii viii ix x xi xii/],
                     format  => "Biggie is %s, smallie is %s";
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /i ii iii iv v vi vii viii ix x xi xii/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~  /Biggie is (\w+)/;
        my ($little) = $r =~ /smallie is (\w+)/;

        if (!defined $big || !defined $little) {
            print "# $hours:$minutes -> $r\n";
            ok (0);

t/04_chef.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'swedish chef';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /one tvu three ffuoor ffeefe six 
                                   sefen eight nine ten elefen tvelfe/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~   /beeg hund is un zee (\w+)/;
        my ($little) = $r =~ /little hund is un zee (\w+)/;

        if (!defined $big || !defined $little) {
            print "# $hours:$minutes -> $r\n";

t/05_warez.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'warez';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw {()nE TW0 7HR3e f0uR f|ve 5ix
                                   ZE\/3n E|6hT n1nE TeN 3L3v3gn 7wELv3};

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ m{\QbIG h4|\||) Yz 0n thE\E (\S+)};
        my ($little) = $r =~ m{\Q7|-|3 lIttlE |-|aND |S 0|\| Th3\E (\S+)};

        if (!defined $big || !defined $little) {
            print "# $hours:$minutes -> $r\n";

t/06_de.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'de';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} split ' ' =>
                               qq /Eins Zwei Drei Vier F\x{FC}nf Sechs Sieben
                                   Acht Neun Zehn Elf Zw\x{F6}lf/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /gro\x{DF}e Zeiger ist auf der (\S+)/;
        my ($little) = $r =~ /kleine Zeiger ist auf der (\S+)/;

        if (!defined $big || !defined $little) {

t/07_fr.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'fr';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /un deux trois quatre cinq six sept
                                   huit neuf dix onze douze/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /grande aiguille est sur le (\w+)/;
        my ($little) = $r =~ /petite aiguille est sur le (\w+)/;

        if (!defined $big || !defined $little) {
            print "# $hours:$minutes -> $r\n";

t/08_no.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'no';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} split ' ' =>
                               qq /en to tre fire fem seks syv
                                   \x{E5}tte ni ti elleve tolv/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /store viseren er p\x{E5} (\S+)/;
        my ($little) = $r =~ /lille viseren er p\x{E5} (\S+)/;

        if (!defined $big || !defined $little) {

t/09_it.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'it';
ok(1); # If we made it this far, we are ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /una due tre quattro cinque sei sette
                                       otto nove dieci undici dodici/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /lancetta lunga e' sull[ae] (\w+)/;
        my ($little) = $r =~   /quella corta e' sull[ae] (\w+)/;

        if (!defined $big || !defined $little) {
            print "# $hours:$minutes -> $r\n";

t/10_se.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'se';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} split ' ' =>
                               qq /ett tv\x{E5} tre fyra fem sex sju
                                   \x{E5}tta nio tio elva tolv/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /stora visaren \x{E4}r p\x{E5} (\S+)/;
        my ($little) = $r =~ /lilla visaren \x{E4}r p\x{E5} (\S+)/;

        if (!defined $big || !defined $little) {

t/11_br.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'br';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} split ' ' =>
                               qq /um dois tr\x{EA}s quatro cinco seis
                                   sete oito nove dez onze doze/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /ponteiro grande est\x{E1} no (\S+)/;
        my ($little) = $r =~ /ponteiro pequeno est\x{E1} no (\S+)/;

        if (!defined $big || !defined $little) {

t/12_es.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'es';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /uno dos tres cuatro cinco seis siete
                                   ocho nueve diez once doce/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /manecilla grande est\x{E1} sobre el (\S+)/;
        my ($little) = $r =~ /manecilla peque\x{F1}a est\x{E1} sobre el (\S+)/;

        if (!defined $big || !defined $little) {
            ok (0);

t/13_ceb.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'ceb';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} qw /usa duha tulo upat lima unom pito walo siyam
                                   napulo/, "napulo'g usa", "napulo'g duha";

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /Ang dako nga kamut naa sa ((?:napulo'g )?\S+)/;
        my ($little) = $r =~ /ang gamay nga kamut naa sa ((?:napulo'g )?\S+)/;

        if (!defined $big || !defined $little) {
            ok (0);

t/14_de_ch.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'de_ch';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} split ' ' =>
                               qq /eis zw\x{F6}i dr\x{FC} vieri f\x{F6}ifi
                                   s\x{E4}chsi sibni achti n\x{FC}ni z\x{E4}ni
                                   elfi zw\x{F6}lfi/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /gross zeiger isch uf em (\S+)/;
        my ($little) = $r =~ /chlii zeiger isch uf em (\S+)/;

t/15_hr.t  view on Meta::CPAN


use Test;
use strict;
BEGIN { plan tests => 1 + 24 * 60 };
use Acme::Time::Baby language => 'hr';
ok(1); # If we made it this far, we're ok.

#########################

my $i = 0;
my %numbers = map {$_ => ++$i} split ' ' =>
                   qq /jedan dva tri \x{010d}etiri pet \x{0161}est sedam
                       osam devet deset jedanaest dvanaest/;

foreach my $hours (1 .. 24) {
    foreach my $minutes (0 .. 59) {
        my $r = babytime "$hours:$minutes";
        my ($big)    = $r =~ /Velika kazaljka pokazuje (\S+)/;
        my ($little) = $r =~ /mala kazaljka pokazuje (\S+)/;

        if (!defined $big || !defined $little) {



( run in 1.260 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )