Preproc-Tiny
view release on metacpan or search on metacpan
t/Preproc-Tiny.t view on Meta::CPAN
}
sub test {
my($in, $out) = @_;
local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /redefined/ }; # sub dup redefined on each pp_text() call
# test pp
write_input($in);
ok 1, "line ".(caller)[2]." - call script";
unlink @out_files;
capture_stderr { ok 0 == system $^X, 'blib/script/pp', @in_files };
check_output($out);
ok 1, "line ".(caller)[2]." - use module old interface";
unlink @out_files;
pp(@in_files);
check_output($out);
ok 1, "line ".(caller)[2]." - use module new interface";
unlink @out_files;
pp_files(@in_files);
check_output($out);
unlink @in_files, @out_files;
# test filter
my $result = pp_text($in);
eq_or_diff $out, $result;
}
( run in 0.923 second using v1.01-cache-2.11-cpan-aadc1410aed )