From 0a3a6770274d0eb0981668b816b1dbe507214244 Mon Sep 17 00:00:00 2001 From: Rob Hoelz Date: Fri, 29 May 2015 17:42:42 -0500 Subject: [PATCH] Test Buf.push with variadic arguments --- S03-operators/buf.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/S03-operators/buf.t b/S03-operators/buf.t index a17aebfb1e..35fe890976 100644 --- a/S03-operators/buf.t +++ b/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:<~^>'; @@ -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