Mac-NSGetExecutablePath

 view release on metacpan or  search on metacpan

t/10-base.t  view on Meta::CPAN


my $path = NSGetExecutablePath();

ok defined($path), 'NSGetExecutablePath() does not return undef';
cmp_ok length($path), '>', 0,
                   'NSGetExecutablePath() returns something of positive length';

my $v = `$path -v`;

ok   defined($v), '`NSGetExecutablePath() -v` returns something';
like $v, qr/This is perl\b/, 'NSGetExecutablePath() points to a perl';

$v = `$path -le 'print "\$]"'`;
ok defined($v), q{`NSGetExecutablePath() -le 'print "$]"'` returns something};
1 while chomp $v;
is $v, "$]", 'NSGetExecutablePath() points to the same perl version';



( run in 0.906 second using v1.01-cache-2.11-cpan-49f99fa48dc )