| 1 |
use Test2::V0; |
| 2 |
|
| 3 |
use File::Spec; |
| 4 |
|
| 5 |
my @parts = File::Spec->splitpath(File::Spec->rel2abs(__FILE__)); |
| 6 |
pop @parts; |
| 7 |
my $path = File::Spec->catpath(@parts); |
| 8 |
|
| 9 |
require 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 via cli, in order" |
| 21 |
); |
| 22 |
|
| 23 |
is($INC[-1], '.', "Dot added last"); |
| 24 |
|
| 25 |
is($ENV{PERL5LIB}, $ENV{OLD_PERL5LIB}, "PERL5LIB has not been modified"); |
| 26 |
|
| 27 |
done_testing; |