Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Looking for help for unit tests and code coverage on an existing perl script

by kcott (Bishop)
on Feb 01, 2014 at 00:55 UTC ( #1072931=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
        warn "Argument required!\n";
        exit;
    }
    
  2. or download this
    #!/usr/bin/env perl
    
    ...
    
    stdout_is { system qw{pm_script_testing.pl 123 qwe} }
                "2: 123 qwe\n", 'Test Two Arguments';
    
  3. or download this
    $ pm_script_testing.t
    1..4
    ...
    ok 2 - Test Zero Arguments
    ok 3 - Test One Argument
    ok 4 - Test Two Arguments
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2020-04-05 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (36 votes). Check out past polls.

    Notices?