Lingua-DE-ASCII

 view release on metacpan or  search on metacpan

t/to_ascii.t  view on Meta::CPAN

#!/usr/bin/perl

use strict;
use warnings;

use Lingua::DE::ASCII;
use Test::More tests => 1;

my $EIGHT_BIT_CHAR    = "[" .chr(128) . "-" . chr(255) . "]";

local @ARGV = (map "t/words_with_$_.dat", "auml", "ouml", "uuml", "szlig", 'foreign');
while (<>) {
    chomp;
    to_ascii($_) !~ /$EIGHT_BIT_CHAR/o
        or diag("to_ascii($_) => " . to_ascii($_) . " contains 8bit characters"),
           fail,
           exit;
}

ok("to_ascii returns really only 7bit characters");



( run in 0.503 second using v1.01-cache-2.11-cpan-d80b1682f3f )