Skip to content

Commit

Permalink
Add test for R#$3014
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jun 23, 2019
1 parent f8bef1a commit 270e09c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S32-list/seq.t
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add("packages/Test-Helpers");
use Test::Util;

plan 42;
plan 44;

my @result = 1,2,3;

Expand Down Expand Up @@ -236,3 +236,11 @@ group-of 2 => 'ZEN slices do not cache Seqs' => {
(my $z-list := ().Seq)[].iterator;
throws-like { $z-list.iterator }, X::Seq::Consumed, '[] ZEN slice';
}


# R#3014
{
my $s = (1, 2, 3).Seq;
is $s.iterator.pull-one, 1, 'did we get 1 as the first value';
dies-ok { $s[0] }, 'did accessing first element die';
}

0 comments on commit 270e09c

Please sign in to comment.