App-spaceless
view release on metacpan or search on metacpan
t/app_spaceless.t view on Meta::CPAN
};
note "[set_path] begin";
note $set_path;
note "[set_path] end";
splice @PATH, 0, 2;
$tmp->file('caller2.sh')->openw->print($set_path, "\n\nscript2.sh\n");
$dir1->file('script2.sh')->openw->print("#!$sh_exe\necho this is script TWO\n");
chmod(0700, $dir1->file('script2.sh'));
subtest 'script2' => sub {
my($out, $err, $exit) = capture { $run_sh->($tmp->file('caller2.sh')) };
is $exit, 0, 'exit okay';
is $err, '', 'error is empty';
like $out, qr{TWO}, "out matches";
};
$tmp->file('caller3.sh')->openw->print($set_path, "\n\nscript3.sh\n");
$dir2->file('script3.sh')->openw->print("#!$sh_exe\necho this is script THREE\n");
chmod(0700, $dir2->file('script3.sh'));
subtest 'script3' => sub {
my($out, $err, $exit) = capture { $run_sh->($tmp->file('caller3.sh')) };
is $exit, 0, 'exit okay';
is $err, '', 'error is empty';
like $out, qr{THREE}, "out matches";
};
};
subtest 'actual spacelessness' => sub {
( run in 0.270 second using v1.01-cache-2.11-cpan-8d75d55dd25 )