1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/perl use strict; use warnings; use Test::More tests => 2; is( 1 + 1, 2, "one plus one is two" ); print "\n"; is( 1 + 1, 11, "one plus one is more than two" );
Quote>perl return_code.pl
1..2
ok 1 - one plus one is two
not ok 2 - one plus one is more than two
# Failed test 'one plus one is more than two'
# at return_code.pl line 11.
# got: '2'
# expected: '11'
# Looks like you failed 1 test of 2.
>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#! /usr/bin/perl use strict; use warnings; use Test::More tests => 2; my %result; $result{test1}->{rc} = is( $result{test1}->{got} = 1 + 1, $result{test1}->{expected} = 2, "one plus one is two", ); $result{test2}->{rc} = is( $result{test2}->{got} = 1 + 1, $result{test2}->{expected} = 11, "one plus one is two", ); require Data::Dumper; print Data::Dumper->new( [ \%result ], [ '*result' ] )->Dump();