summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikola Knezevic <indy@tesla.rcub.bg.ac.yu>2002-05-28 10:17:53 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-28 12:26:34 +0000
commit195d559b8ef22ad8837051fd15a3100fca99b37f (patch)
treeb644beae0d8adf1368e4e1c588e706bc30c5e6ab /lib
parent9a8de00333030b382665b01907d7004a16aafd41 (diff)
downloadperl-195d559b8ef22ad8837051fd15a3100fca99b37f.tar.gz
Test::Harness and skiping tests functionality
Message-ID: <40949173.20020528081753@tesla.rcub.bg.ac.yu> p4raw-id: //depot/perl@16829
Diffstat (limited to 'lib')
-rw-r--r--lib/Test/Harness.pm7
-rw-r--r--lib/Test/Harness/Straps.pm6
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm
index 0efaa53b4e..be04797402 100644
--- a/lib/Test/Harness.pm
+++ b/lib/Test/Harness.pm
@@ -159,6 +159,13 @@ emitted if the test script is skipped completely:
1..0 # Skipped: no leverage found
+If you don't have any comment on skipping, just print C<1..0> with
+nothing after it. Test::Harness will say something like this:
+
+op/64bitint..............skipped
+ skipped: no reason given
+
+
=item B<Todo tests>
If the standard output line contains the substring C< # TODO> after
diff --git a/lib/Test/Harness/Straps.pm b/lib/Test/Harness/Straps.pm
index 173b26bc61..8ce5722eda 100644
--- a/lib/Test/Harness/Straps.pm
+++ b/lib/Test/Harness/Straps.pm
@@ -444,7 +444,11 @@ sub _is_header {
$self->{max} = $max;
assert( $self->{max} >= 0, 'Max # of tests looks right' );
- if( defined $extra ) {
+ if( not $max and not $extra) {
+ #We're skipping, thats for sure
+ $self->{skip_all} = 'no reason given';
+ }
+ elsif( defined $extra ) {
my($todo, $skip, $reason) = $extra =~ /$Extra_Header_Re/xo;
$self->{todo} = { map { $_ => 1 } split /\s+/, $todo } if $todo;