X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F40-vshift.t;h=635bba2842deed62203c1264256a9597a29f78ac;hb=3fdc4bd1cd11d103feda665580f1753297e0a470;hp=5fe1b69feded44e87c5d534b904bc2faba27cee9;hpb=c36fbc2566b9aeb0642e7a1b2fb8fc843faff3e9;p=perl%2Fmodules%2FScalar-Vec-Util.git diff --git a/t/40-vshift.t b/t/40-vshift.t index 5fe1b69..635bba2 100644 --- a/t/40-vshift.t +++ b/t/40-vshift.t @@ -3,10 +3,18 @@ use strict; use warnings; -use Test::More 'no_plan'; +use lib 't/lib'; +use Test::Leaner 'no_plan'; use Scalar::Vec::Util qw/vshift SVU_SIZE/; +for ([ 1, 'offset', -1 ], [ 2, 'length', '-1' ]) { + my @args = ('1') x 4; + $args[$_->[0]] = $_->[2]; + eval { &vshift(@args) }; my $line = __LINE__; + like $@, qr/^Invalid\s+negative\s+$_->[1]\s+at\s+\Q$0\E\s+line\s+$line/; +} + my $p = SVU_SIZE; $p = 8 if $p < 8; my $n = 3 * $p;