summaryrefslogtreecommitdiff
path: root/t/33-keep-errsv.t
blob: 8c0324e3e5e4325372017ebacfada86240cf29a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;

use Params::Validate qw( validate SCALAR );

use Test::More;

{
    $@ = 'foo';
    v( bar => 42 );

    is(
        $@,
        'foo',
        'calling validate() does not clobber'
    );
}

done_testing();

sub v {
    validate( @_, { bar => { type => SCALAR } } );
}