#!/usr/bin/perl -w use strict; use Test::More tests => 10; BEGIN { use_ok("MPEG::Audio::Frame") } { isa_ok(my $frame = MPEG::Audio::Frame->read(\*DATA), "MPEG::Audio::Frame"); ok($frame->crc, "frame has CRC"); ok(!$frame->broken, "CRC is good"); } { isa_ok(my $frame = MPEG::Audio::Frame->read(\*DATA), "MPEG::Audio::Frame"); ok($frame->crc, "same frame with garbled innards has CRC"); ok($frame->broken, "CRC is bad"); } { isa_ok(my $frame = MPEG::Audio::Frame->read(\*DATA), "MPEG::Audio::Frame"); ok($frame->crc, "same frame with garbled innards has CRC"); ok($frame->broken, "CRC is bad"); } __DATA__ this data is the second frame from basic.t. the first copy was left intact the second has a garbled header the third has garbled content ɊH&N HHe"= jKc:#f;+\ o> 5gbqO P(%1s?&.A"69O'ly+a*r.W"S"PhOfPr.nE|n\.x Si* o G@0< No| Y8 L\1da8ȟ,"9 ,"c0A @Ș x 6Ar ό7 Pо_7p00 D=1sA%YhROA0=AE$afbI%EM$ffkRUUzUj[etMC#=3LsBphq\`YF 0Ѐsh>!hBYt4b `Y(nQ&< aH&N HHe"= jKc:#f;+\ o> 5gbqO P(%1s?&.A"69O'ly+a*r.W"S"PhOfPr.nE|n\.x Si* o G@0< No| Y8 L\1da8ȟ,"9 ,"c0A @Ș x 6Ar ό7 Pо_7p00 D=1sA%YhROA0=AE$afbI%EM$ffkRUUzUj[etMC#=3LsBphq\`YF 0Ѐsh>!hBYt4b `Y(nQ&< dgkuwj more ʬĩϫgarbage&&$Y n4bnoet ɊH&N HHe"=