summaryrefslogtreecommitdiff
path: root/t/release-pp-33-keep-errsv.t
blob: 24f3ded54949519bf82c1074e4d1c339b7d0472d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36


use Test::More;

BEGIN {
    unless ( $ENV{RELEASE_TESTING} ) {
        plan skip_all => 'these tests are for release testing';
    }

    $ENV{PV_TEST_PERL} = 1;
}

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 } } );
}