3 use TAP
::Harness
::JUnit
;
12 resultcode
=> 'Successful test with good plan and a bad return code',
13 badplan
=> 'Has a plan, successful tests, just too small amount of them',
14 funkyindent
=> 'Indentation of comments',
15 uniquename
=> 'Multiple tests with identical names',
16 nonutf8log
=> 'Special characters in log',
17 earlyterm
=> 'Bad plan and non-zero return value',
20 plan tests
=> int (keys %tests);
22 foreach my $test (keys %tests) {
23 my $model = dirname
($0)."/tests/$test.xml";
24 my $outfile = File
::Temp
->new (UNLINK
=> 0)->filename;
26 $harness = new TAP
::Harness
::JUnit
({
33 $harness->runtests ([dirname
($0)."/tests/$test.txt" => $tests{$test}]);
35 my $expected = XMLin
($model);
36 $expected->{testsuite
}{'time'} = re
('^\d+\.\d+');
38 cmp_deeply
(XMLin
($outfile), $expected, "Output of $test matches model");