Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Test::Inline 2.212

    Download button

    No screenshots available
    Downloads: 257  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Adam Kennedy | More programs
    Perl Artistic License / FREE
    January 30th, 2009, 15:34 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Test::Inline description

    Embed your tests in your code, next to what is being tested

    Test::Inline is a Perl module to embed your tests in your code, next to what is being tested.

    Embedding tests allows tests to be placed near the code being tested.

    This is a nice supplement to the traditional .t files.
    How does it work?

    Test::Inline lets you write small fragments of general or function-specific testing code, and insert it anywhere you want in your modules, inside a specific tagged POD segment, like the following.

     =begin testing
     
     # This code assumes we have a cpuinfo file
     ok( -f /proc/cpuinfo, 'Host has a standard /proc/cpuinfo file' );
     
     =end testing
     
     
     
     =begin testing label
     
     # Test generation of the HTML tag
     is( My::HTML->label('foo'), '< label >foo< /label >', '->label(simple) works' );
     is( My::HTML->label('bar', 'foo'), '< label for="bar" >foo< /label >', '->label(for) works' );
     
     =end testing

    You can add as many, or as few, of these chunks of tests as you wish. The key condition when writing them is that they should be logically independant of each other. Each chunk of testing code should not die or crash if it is run before or after another chunk.

    Using inline2test or another test compiler, you can then transform these chunks in a test script, or an entire tree of modules into a complete set of standard Test::More-based test scripts.

    These test scripts can then be executed as normal.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    embed test | test inline | Perl module | Perl | test | embed

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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