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");

t/to_latin1.t  view on Meta::CPAN

#!/usr/bin/perl

use strict;
use warnings;

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

use constant CHUNK_SIZE => 250;

local @ARGV = ( 
    "t/english.dat",
    map {"t/words_with_$_.dat"} 
    ("foreign", "auml", "ouml", "uuml", "szlig", "ae", "oe", "ue", "ss")
);

chomp( my @all_words = <> );

my $progress    = eval {
    require Term::ProgressBar;
    Term::ProgressBar->new({



( run in 0.570 second using v1.01-cache-2.11-cpan-49f99fa48dc )