Debian Codegraph @

t/integration/includes/not-perl.pl

raw
1 use Test2::V0;
2 use File::Spec;
3 use Config qw/%Config/;
4
5 my @parts = File::Spec->splitpath(File::Spec->rel2abs(__FILE__));
6 pop @parts;
7 my $path = File::Spec->catpath(@parts);
8
9 use App::Yath;
10
11 like(
12 \@INC,
13 [
14 App::Yath->app_path,
15 File::Spec->catdir($path, 'xyz'),
16 File::Spec->catdir($path, 'lib'),
17 File::Spec->catdir($path, 'blib', 'lib'),
18 File::Spec->catdir($path, 'blib', 'arch'),
19 ],
20 "Added all the expected paths in order"
21 );
22
23 like(
24 [split $Config{path_sep}, $ENV{PERL5LIB}],
25 [
26 App::Yath->app_path,
27 File::Spec->catdir($path, 'xyz'),
28 File::Spec->catdir($path, 'lib'),
29 File::Spec->catdir($path, 'blib', 'lib'),
30 File::Spec->catdir($path, 'blib', 'arch'),
31 ],
32 "When running non-perl the libs were added via PERL5LIB"
33 );
34
35 done_testing;