Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Test::Lazy 0.061

    Download button

    No screenshots available
    Downloads: 276  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Robert Krimen | More programs
    Perl Artistic License / FREE
    July 18th, 2007, 20:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Test::Lazy description

    A quick and easy way to compose and run tests with useful output.

    Test::Lazy is a quick and easy way to compose and run tests with useful output.

    SYNOPSIS

    use Test::Lazy qw/check try/;

    check(1 => is => 1);
    check(0 => isnt => 1);
    check(a => like => qr/[a-zA-Z]/);
    check(0 => unlike => qr/a-zA-Z]/);
    check(1 => '>' => 0);
    check(0 => '. See `perldoc -m Test::Lazy` for more detail.


    Note, if < expected> is an ARRAY or HASH, this function will convert it to it's JSON representation before comparison.

    try("2 + 2" => '==' => 5);

    # This will produce the following output:

    # Failed test '2 + 2 == 5'
    # at __FILE__ line __LINE__.
    # got: '4'
    # expected: '5'
    check( < got>, < cmpr>, < expected>, [ < msg> ] )


    Compare < got> to < expected> using < cmpr>. Optionally provide a < msg> to display on failure. If < msg> is not given, then one will be automatically made from < got>, < cmpr>, and < expected>.

    Note, if < got> or < expected> is an ARRAY or HASH, this function will convert them to their JSON representation before comparison.

    check([qw/a b/] => is => [qw/a b c/]);

    # This will produce the following output:

    # Failed test '["a","b"] is ["a","b","c"]'
    # at __FILE__ line __LINE__.
    # got: '["a","b"]'
    # expected: '["a","b","c"]'
    template( ... )


    Convenience function for creating a Test::Lazy::Template. All arguments are directly passed to Test::Lazy::Template-new>.

    See Test::Lazy::Template for more details.

    Returns a new Test::Lazy::Template object.

    cmpr

    < cmpr> can be one of the following:

    ok, not_ok, is, isnt, like, unlike,
    , =, lt, gt, le, ge, ==, !=, eq, ne,



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    compose test | execute test | Perl module | Test | compose | execute

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM