X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScalar-Vec-Util.git;a=blobdiff_plain;f=t%2F40-vshift.t;h=4c27c8324846b80f5837f64352718cdf8ff1e0f5;hp=5fe1b69feded44e87c5d534b904bc2faba27cee9;hb=607607c4f5ec537ba56acb4edc424bc71900517a;hpb=dec1755eec42f54c4d57813ed03393c0f765a699 diff --git a/t/40-vshift.t b/t/40-vshift.t index 5fe1b69..4c27c83 100644 --- a/t/40-vshift.t +++ b/t/40-vshift.t @@ -7,6 +7,13 @@ use Test::More '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;