summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Test-Simple/t/regression/642_persistent_end.t
blob: b12826384804da5d4b834578d8e490c0e9ec8cac (plain) (blame)
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
use Test::More;
use strict;
use warnings;

use Test2::API qw{
    test2_set_is_end
    test2_get_is_end
    intercept
};

my %res;
intercept {
    my $tb = Test::Builder->new;
    $res{before} = test2_get_is_end();
    test2_set_is_end();
    $res{isset} = test2_get_is_end();
    $tb->reset;
    $res{reset} = test2_get_is_end();
};

ok(!$res{before}, "Not the end");
ok($res{isset}, "the end");
ok(!$res{reset}, "Not the end");

done_testing;