### ----------------------------------------------------
### -- String::Utils
### -- Licenses: Artistic-2.0
### -- Authors: Elizabeth Mattijsen
### -- File: t/02-selective-importing.rakutest
### ----------------------------------------------------
use Test;

my constant @subs = <
  abbrev after all-same around before between between-included
  chomp-needle consists-of expand-tab has-marks is-sha1 is-lowercase
  is-uppercase is-whitespace leading-whitespace leaf letters ngram
  non-word regexify root stem trailing-whitespace word-at
>;

plan @subs + 2;

my $code;
for @subs {
    $code ~= qq:!c:to/CODE/;
    {
        use String::Utils '$_';
        ok MY::<&$_>:exists, "Did '$_' get exported?";
    }
    CODE
}

$code ~= qq:!c:to/CODE/;
{
    use String::Utils <root:common-start>;
    ok MY::<&common-start>:exists, "Did 'common-start' get exported?";
    is MY::<&common-start>.name, 'root', 'Was the original name "root"?';
}
CODE

$code.EVAL;

# vim: expandtab shiftwidth=4


