|
NAMETest::HexDifferences - Test binary as hexadecimal stringVERSION1.001SYNOPSISuse Test::HexDifferences; eq_or_dump_diff( $got, $expected, ); eq_or_dump_diff( $got, $expected, $test_name, ); eq_or_dump_diff( $got, $expected, { address => $start_address, format => "%a : %4C : %d\n", } $test_name, ); If $got or $expected is "undef" or a reference, the hexadecimal formatter is off. Then "eq_or_dump_diff" is a text compare. dumped_eq_dump_or_diff( $got_value, $expected_dump, ); dumped_eq_dump_or_diff( $got_value, $expected_dump, $test_name, ); dumped_eq_dump_or_diff( $got_value, $expected_dump, { address => $start_address, format => "%a : %4C : %d\n", } $test_name, ); See Test::HexDifferences::HexDump for the format description. EXAMPLEInside of this Distribution is a directory named example. Run this *.t files.DESCRIPTIONThe are some special cases for testing binary data.
SUBROUTINES/METHODSsubroutine eq_or_dump_diffeq_or_dump_diff( $got_value, $expected_value, { # optional hash reference address => $display_start_address, # optional format => $format_string, # optional } $test_name, # optional ); subroutine dumped_eq_dump_or_diffdumped_eq_dump_or_diff( $got_value, $expected_dump, { # optional hash reference address => $display_start_address, # optional format => $format_string, # optional } $test_name, # optional ); DIAGNOSTICSnothingCONFIGURATION AND ENVIRONMENTnothingDEPENDENCIESSub::ExporterTest::Builder::Module Test::HexDifferences::HexDump Text::Diff INCOMPATIBILITIESnoneBUGS AND LIMITATIONSnoneSEE ALSOTest::HexDifferences::HexDumpAUTHORSteffen WinklerLICENSE AND COPYRIGHTCopyright (c) 2012 - 2015, Steffen Winkler "<steffenw at cpan.org>". All rights reserved.This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |