# HG changeset patch # User wizard # Date 1271252291 -14400 # Node ID e568c7c8b743fcc3ba446136529333c646ea3519 # Parent 74bae30eb25e4a5df35e860bbeaf74ba1b0a3c09 Minor changes to the test infrastructure diff -r 74bae30eb25e -r e568c7c8b743 Lib/IMPL/Test.pm --- a/Lib/IMPL/Test.pm Tue Apr 13 20:27:56 2010 +0400 +++ b/Lib/IMPL/Test.pm Wed Apr 14 17:38:11 2010 +0400 @@ -2,9 +2,11 @@ use strict; use warnings; +require IMPL::Test::SkipException; + require Exporter; our @ISA = qw(Exporter); -our @EXPORT_OK = qw(&test &shared &failed &cmparray); +our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip); require IMPL::Test::Unit; use IMPL::Class::Member; @@ -34,6 +36,10 @@ die new IMPL::Test::FailException(@_); } +sub skip($;@) { + die new IMPL::Test::SkipException(@_); +} + sub cmparray { my ($a,$b) = @_; diff -r 74bae30eb25e -r e568c7c8b743 Lib/IMPL/Test/TAPListener.pm --- a/Lib/IMPL/Test/TAPListener.pm Tue Apr 13 20:27:56 2010 +0400 +++ b/Lib/IMPL/Test/TAPListener.pm Wed Apr 14 17:38:11 2010 +0400 @@ -58,7 +58,7 @@ $result->State == IMPL::Test::Result::SUCCESS ? "ok $n " . join("\n# ", split(/\n/, $result->Name) ) : - "not ok $n " . (eval { $result->Exception->isa('IMPL::Test::SkipException') } ? '# SKIP ' : '') . join("\n# ", split(/\n/, $result->Name."\n".$result->Exception || '') ) + "not ok $n " . (eval { $result->Exception->isa('IMPL::Test::SkipException') } ? '#SKIP: ' : '') . join("\n# ", split(/\n/, $result->Name.": ".$result->Exception || '') ) ),"\n"; }