Perl's Test::Simple library is not installed by default, use Test instead.

This commit is contained in:
Andrew Johnson
2008-09-11 22:35:01 +00:00
parent 111a140059
commit e2896fa82f

View File

@@ -1,25 +1,29 @@
#!/usr/bin/perl
use Test::Simple tests => 1;
use strict;
use Test;
$prog = "./$0";
BEGIN {plan tests => 1}
my $prog = "./$0";
$prog =~ s/\.t$//;
$expected = "1..11\n" .
"ok 1 - testOk(1)\n" .
"not ok 2 - testOk(0)\n" .
"ok 3 - testPass()\n" .
"not ok 4 - testFail()\n" .
"ok 5 # SKIP Skipping two\n" .
"ok 6 # SKIP Skipping two\n" .
"ok 7 - Todo pass # TODO Testing Todo\n" .
"not ok 8 - Todo fail # TODO Testing Todo\n" .
"ok 9 # SKIP Todo skip\n" .
"ok 10 - testOk1_success\n" .
"not ok 11 - testOk1_failure\n" .
"# Diagnostic\n";
my $expected =
"1..11\n" .
"ok 1 - testOk(1)\n" .
"not ok 2 - testOk(0)\n" .
"ok 3 - testPass()\n" .
"not ok 4 - testFail()\n" .
"ok 5 # SKIP Skipping two\n" .
"ok 6 # SKIP Skipping two\n" .
"ok 7 - Todo pass # TODO Testing Todo\n" .
"not ok 8 - Todo fail # TODO Testing Todo\n" .
"ok 9 # SKIP Todo skip\n" .
"ok 10 - testOk1_success\n" .
"not ok 11 - testOk1_failure\n" .
"# Diagnostic\n";
$ENV{HARNESS_ACTIVE} = 1;
$result = `$prog`;
my $result = `$prog`;
ok($result eq $expected, 'test output matches');
ok($result, $expected); # test output matches