package
main;
require
v5.14.0;
use
Cwd;
use
Config;
use
File::Spec;
sub
sa_t_init {
my
$tname
=
shift
;
map
{
my
$pathdir
=
$_
;
my
$canonpathdir
= File::Spec->canonpath(Cwd::realpath(
$pathdir
))
if
(File::Spec->file_name_is_absolute(
$pathdir
) and (-d
$pathdir
));
((
defined
$canonpathdir
))?(
$canonpathdir
):()
}
$ENV
{
'PERL5LIB'
} ?
split
(
$Config
{path_sep},
$ENV
{
'PERL5LIB'
}) :
@INC
;
(-f
"t/test_dir"
) &&
chdir
(
"t"
);
# run from ..
-f
"test_dir"
or
die
"FATAL: not in test directory?\n"
;
return
;
}
1;