Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spectests for List.squish adapted to new :as functionality
  • Loading branch information
lizmat committed Aug 4, 2013
1 parent 6f39558 commit 70ed9dc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions S32-list/squish.t
Expand Up @@ -63,13 +63,13 @@ This test tests the C<squish> builtin and .squish method on Any/List.
#?niecza skip 'NYI'
{
my @array = <a b bb c d e f f a>;
my $with = -> $a, $b { substr($a,0,1) eq substr($b,0,1) };
is_deeply @array.squish(:$with), <a b c d e f a>.list.item,
"method form of squish works";
is_deeply squish(@array,:$with), <a b c d e f a>.list.item,
"subroutine form of squish works";
is_deeply @array .= squish(:$with), [<a b c d e f a>],
"inplace form of squish works";
my $as = {substr $^a,0,1};
is_deeply @array.squish(:$as), <a b c d e f a>.list.item,
"method form of squish with :as works";
is_deeply squish(@array,:$as), <a b c d e f a>.list.item,
"subroutine form of squish with :as works";
is_deeply @array .= squish(:$as), [<a b c d e f a>],
"inplace form of squish with :as works";
is_deeply @array, [<a b c d e f a>],
"final result of in place";
} #4
Expand Down

0 comments on commit 70ed9dc

Please sign in to comment.