Debian Codegraph @

t2/caller.t

raw
1 package FooBarBaz;
2 use strict;
3 use warnings;
4 # HARNESS-DURATION-SHORT
5
6 use Test2::V0;
7
8 is([caller(0)], [], "No caller at the flat test level");
9 is(__PACKAGE__, 'FooBarBaz', "inside main package");
10 like(__FILE__, qr/caller\.t$/, "__FILE__ is correct");
11 is(__LINE__, 11, "Got the correct line number");
12 is($@, '', '$@ set to empty string');
13
14 done_testing;