- ok|Test::Simple
Test::Simple ok( trueness, name);
- The previous examples using Test::Simple.
examples/test-more/t/30.t
use strict; use warnings; use lib 'lib'; use MySimpleCalc qw(sum); use Test::Simple tests => 3; ok( sum(1, 1) == 2, '1+1'); ok( sum(2, 2) == 4, '2+2'); ok( sum(2, 2, 2) == 6, '2+2+2');
perl t/30.t
1..3 ok 1 - 1+1 ok 2 - 2+2 not ok 3 - 2+2+2 # Failed test '2+2+2' # at t/30.t line 11. # Looks like you failed 1 test of 3.