Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tests for Buf.subbuf
  • Loading branch information
moritz committed Mar 1, 2012
1 parent d26054b commit 844bcb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion S03-operators/buf.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 23;
plan 25;

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

Expand Down Expand Up @@ -36,3 +36,6 @@ is $b cmp $a, Order::Decrease, 'cmp (larger)';
is_deeply Buf.new(1, 2, 3) ~ Buf.new(4, 5), Buf.new(1, 2, 3, 4, 5), '~ concatenates';
nok Buf.new(), 'empty Buf is false';
ok Buf.new(1), 'non-empty Buf is true';

ok Buf.new(1, 2, 3, 4).subbuf(2) eqv Buf.new(3, 4), '.subbuf(start)';
ok Buf.new(1, 2, 3, 4).subbuf(1, 2) eqv Buf.new(2, 3), '.subbuf(start, len)';

0 comments on commit 844bcb2

Please sign in to comment.