Sha256: 90896278943bea858195748b2be35b8d8ad649c107d57a10dd77131e47e26b8e

Contents?: true

Size: 1010 Bytes

Versions: 19

Compression:

Stored size: 1010 Bytes

Contents

use v6;
use Test;
use lib './';

plan 8;

BEGIN { EVAL('use Example') }; pass 'Load module';

ok Word_Counter.can('count_words'), 'Class Word_Counter has count_words method';

is-deeply Word_Counter.count_words('word'),                                {word =>  1},                    'one word';
is-deeply Word_Counter.count_words('one of each'),                         {one => 1, of => 1, each => 1},  'one of each';
is-deeply Word_Counter.count_words('one fish two fish red fish blue fish'), 
    {one => 1, fish => 4, two => 1, red => 1, blue => 1}, 
    'multiple occurences';
is-deeply Word_Counter.count_words('car : carpet as java : javascript!!&@$%^&'), 
    {car => 1, carpet => 1, as => 1, java => 1, javascript => 1},
    'ignore punctuation';
is-deeply Word_Counter.count_words('testing, 1, 2 testing'),               {testing => 2, 1 => 1, 2 => 1}, 'include numbers';
is-deeply Word_Counter.count_words('go Go GO'),                            {go => 3},                       'normalize case';


Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
trackler-2.0.0.8 tracks/perl6/word-count/word_count.t
trackler-2.0.0.7 tracks/perl6/word-count/word_count.t
trackler-2.0.0.6 tracks/perl6/word-count/word_count.t
trackler-2.0.0.5 tracks/perl6/word-count/word_count.t
trackler-2.0.0.4 tracks/perl6/word-count/word_count.t
trackler-2.0.0.3 tracks/perl6/word-count/word_count.t
trackler-2.0.0.2 tracks/perl6/word-count/word_count.t
trackler-2.0.0.1 tracks/perl6/word-count/word_count.t
trackler-2.0.0.0 tracks/perl6/word-count/word_count.t
trackler-1.0.4.1 tracks/perl6/word-count/word_count.t
trackler-1.0.4.0 tracks/perl6/word-count/word_count.t
trackler-1.0.3.0 tracks/perl6/word-count/word_count.t
trackler-1.0.2.1 tracks/perl6/word-count/word_count.t
trackler-1.0.2.0 tracks/perl6/word-count/word_count.t
trackler-1.0.1.2 tracks/perl6/word-count/word_count.t
trackler-1.0.1.1 tracks/perl6/word-count/word_count.t
trackler-1.0.1.0 tracks/perl6/word-count/word_count.t
trackler-1.0.0.1 tracks/perl6/word-count/word_count.t
trackler-1.0.0 tracks/perl6/word-count/word_count.t