Help for this page

Select Code to Download


  1. or download this
    use strictures;
    use Test::More;
    # plan test count here or use done_testing($count).
    ...
    sub get_number {
        int(rand(1000));
    }
    
  2. or download this
    ~>prove my-test.t -v
    ok 1 - Hello world is hello world
    ok 2 - get_number() returns greater than zero
    ...
      Failed test:  3
    Files=1, Tests=3,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.03 cusr 
    + 0.00 csys =  0.07 CPU)
    Result: FAIL
    
  3. or download this
    ok 1 - Hello world is hello world
    ok 2 - get_number() returns greater than zero
        ok 1 - get_number() returns greater than zero
    ...
    All tests successful.
    Files=1, Tests=3,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.03 cusr 
    + 0.00 csys =  0.07 CPU)
    Result: PASS