The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::LongString - tests strings for equality

SYNOPSIS

    use Test::More tests => 1;
    use Test::LongString;
    is_string('foobar','foobur');

DESCRIPTION

This module provides a function is_string() basically equivalent to Test::More::is(), but that gives more verbose diagnostics in case of failure.

  • It reports only the 50 first characters of the compared strings in the failure message, in case of long strings, so this doesn't clutter the test's output. This threshold value can be changed by setting $Test::LongString::Max.

  • It reports the lengths of the strings that have been compared.

  • It reports the length of the common prefix of the strings.

  • In the diagnostics, non-ASCII characters are escaped as \x{xx}.

AUTHOR

Written by Rafael Garcia-Suarez. Thanks to Mark Fowler (and to Joss Whedon) for the inspirational Acme::Test::Buffy.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

$Id$

SEE ALSO

Test::Builder, Test::Builder::Tester, Test::More.