use
strict;
use
warnings;
use
FindBin;
use
Test::Fatal;
my
$corpus
= path(
$FindBin::Bin
)->parent->parent->child(
'corpus'
)->child(
'reconstruct'
);
use
EventPipe;
for
my
$file
(
$corpus
->children() ) {
my
$content
=
$file
->slurp;
my
$output
;
my
$fn
=
$file
->relative(
$corpus
)->stringify;
is(
exception {
$output
= EventPipe->transform_string(
$content
);
},
undef
,
'can parse and reconstruct '
.
$fn
);
eq_or_diff_text(
$output
,
$content
,
"$fn reconstructed faithfully"
);
}