Skip to content

Commit

Permalink
Test Buf.push with variadic arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
hoelzro committed May 29, 2015
1 parent 59cbe8d commit 0a3a677
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S03-operators/buf.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 48;
plan 51;

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

Expand Down Expand Up @@ -121,6 +121,12 @@ ok Buf.new.subbuf(0, 1) eqv Buf.new(), "subbuf on an empty buffer";
is $a.elems, 6, "Buf .elems correct after pushing a list";
is $a[4], 5, "Buf penultimate element correct after push a list";
is $a[5], 6, "Buf last element correct after push a list";

$a.push(7, 8);

is $a.elems, 8, "Buf .elems correct after pushing varargs";
is $a[6], 7, "Buf penultimate element correct after push varargs";
is $a[7], 8, "Buf last element correct after push varargs";
}

# RT #123928
Expand Down

0 comments on commit 0a3a677

Please sign in to comment.