Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Eliminating duplicated code in multiple test scripts using Test::More

by kcott (Abbot)
on Jul 20, 2013 at 07:42 UTC ( #1045429=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    subtest tmod => sub { TMod::sub1() };
    ok( 3 == 4, "mytest3" );
    ok( 4 == 4, "mytest4" );
    
  2. or download this
    package TMod;
    use strict;
    ...
    }
    
    1;
    
  3. or download this
    $ perl t1.pl
    1..4
    ...
    #   at t1.pl line 12.
    ok 4 - mytest4
    # Looks like you failed 2 tests of 4.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045429]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (20)
As of 2015-07-31 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls