X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F40-vshift.t;h=15d1decb7912af527e565e3a77343c96eba8397b;hb=0f9ca88734df707e9f1d70a8067e6502b96820a9;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..15d1dec 100644 --- a/t/40-vshift.t +++ b/t/40-vshift.t @@ -3,9 +3,17 @@ 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/; +use Scalar::Vec::Util qw; + +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;