Acme-EyeDrops

 view release on metacpan or  search on metacpan

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

#!/usr/bin/perl
# 00_Coffee.t (was convert.t)

# Test ascii_to_sightly() and sightly_to_ascii().

use strict;
use Acme::EyeDrops qw(ascii_to_sightly sightly_to_ascii);

$|=1;

# XXX: The print "not " hack used below does not work on VMS apparently
# (for some odd reason, I think it prints a newline after the "not ")

print "1..10\n";

my $t1 = 'abcdefghijklmnopqrstuvwxyz';
my $f1 = ascii_to_sightly($t1);
# There are 32 characters in the sightly character set, namely:
# 33-47 (15), 58-64 (7), 91-96 (6), 123-126 (4).
$f1 =~ /[^!"#\$%&'()*+,\-.\/:;<=>?\@\[\\\]^_`\{|\}~]/ and print "not ";
print "ok 1\n";

t/16_astride.t  view on Meta::CPAN

         ++$rc;
      }
   }
   print "# kid $kid exit\n";
   return $rc;
}

my @kids = ();
for my $i (1 .. $Num_Threads) {
   my $t = threads->new(\&do_one_thread, $i);
   print "# parent $$: continue\n";
   push @kids, $t;
}
for my $t (@kids) {
   print "# parent $$: waiting for join\n";
   my $rc = $t->join();
   cmp_ok( $rc, '==', 0, "threads exit status is $rc" );
}



( run in 0.307 second using v1.01-cache-2.11-cpan-4d50c553e7e )