### ----------------------------------------------------
### -- String::Rotate
### -- Licenses: Artistic-2.0
### -- Authors: Steve Schulze (thundergnat)
### -- File: t/01-basic.rakutest
### ----------------------------------------------------
use Test;
use String::Rotate;

use MONKEY-TYPING;
augment class Str does Rotate { }

plan 136;

my $str = 'Supercalifragilisticexpialidocious';

for ^$str.chars {
   is($str.rotate($_), $str.comb.list.rotate($_).join, "method rotate $_ ok");
   is($str.rotate(-$_), $str.comb.list.rotate(-$_).join, "method rotate -$_ ok");
   is(rotate($str, $_), $str.comb.list.rotate($_).join, "sub rotate $_ ok");
   is(rotate($str, -$_), $str.comb.list.rotate(-$_).join, "sub rotate -$_ ok");
}

done-testing;


