1use Test::More; 2use strict; 3use warnings; 4 5use Test2::API qw{ 6 test2_set_is_end 7 test2_get_is_end 8 intercept 9}; 10 11my %res; 12intercept { 13 my $tb = Test::Builder->new; 14 $res{before} = test2_get_is_end(); 15 test2_set_is_end(); 16 $res{isset} = test2_get_is_end(); 17 $tb->reset; 18 $res{reset} = test2_get_is_end(); 19}; 20 21ok(!$res{before}, "Not the end"); 22ok($res{isset}, "the end"); 23ok(!$res{reset}, "Not the end"); 24 25done_testing; 26