Debian Codegraph @

t/20registrations.t

raw
1 #!/usr/bin/perl
2
3 use v5.14;
4 use warnings;
5
6 use Test2::V0;
7
8 use lib "t";
9 use testcase "t::registrations";
10
11 # Check the individual `func` registrations do not clash
12 {
13 {
14 BEGIN { $^H{"t::registrations/red"} = 1 }
15 func returns_red { }
16 }
17 {
18 BEGIN { $^H{"t::registrations/blue"} = 1 }
19 func returns_blue { }
20 }
21
22 is( returns_red(), "red", 'returns red' );
23 is( returns_blue(), "blue", 'returns blue' );
24 }
25
26 done_testing;