Skip to content

Commit b2ac729

Browse files
committed
Add tests for Blob|Buf.new(my @A)
1 parent 4552522 commit b2ac729

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

S03-operators/buf.t

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 101;
4+
plan 103;
55

66
ok (~^"foo".encode eqv utf8.new(0x99, 0x90, 0x90)), 'prefix:<~^>';
77

@@ -183,3 +183,11 @@ throws-like { Buf.new().subbuf(0, -1) }, X::OutOfRange,
183183
is-deeply $b.subbuf(10..20), Buf.new(10..20),
184184
'can we use 10..20 as specifier';
185185
}
186+
187+
{
188+
my @a;
189+
my $b = Blob.new(@a);
190+
is $b.elems, 0, "did Blob.new on empty array work";
191+
my $c = Buf.new(@a);
192+
is $c.elems, 0, "did Buf.new on empty array work";
193+
}

0 commit comments

Comments
 (0)