use
v5.14;
use
warnings;
use
Data::Dumper;
use
t::Runner;
$ENV
{PERL5LIB} =
join
':'
,
@INC
;
sub
ansifold {
my
@opts
=
@_
;
Runner->new(
sub
{
App::ansifold->new->perform(
@opts
);
});
}
sub
test {
my
%arg
=
@_
;
(
my
$runner
= ansifold shellwords(
$arg
{option}))
->setstdin(
$arg
{stdin})->run;
is(
$runner
->{stdout},
$arg
{expect},
"option: $arg{option}"
);
}
1;