Acme-RFC4824

 view release on metacpan or  search on metacpan

t/01-encode_decode.t  view on Meta::CPAN

    FRAME => $ascii2,
});
ok($test_packet2 eq $test, 'Test packet from RFC4824 authors decoding');

my $packet = $sfss->decode({
    FRAME => $ascii,
});
if ($ENV{DEBUG}) {
    diag "Decoded packet (in hex): " . unpack('H*', $packet);
}
# test that decoding the ASCII representation yields the original packet
ok($packet eq $test_packet, 'Re-encoding yields original representation');

# test that adding errors that are cancelled using SUN (signal undo)
# does not change the resulting packet
my $frame_cancelled_errors = 'AAASSS' . $ascii;
$packet = $sfss->decode({
    FRAME => $frame_cancelled_errors,
});
if ($ENV{DEBUG}) {
    diag "Decoded packet (in hex): " . unpack('H*', $packet);
}



( run in 1.130 second using v1.01-cache-2.11-cpan-1c8d708658b )