geoff 2004/05/27 02:05:05
Modified: perl-framework/Apache-Test Changes
perl-framework/Apache-Test/lib/Apache Test.pm
Log:
add skip_reason() to give meaningful user-level API access to @SkipReasons
document skip_reason() and under_construction()
Revision Changes Path
1.135 +3 -0 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- Changes 26 May 2004 02:14:36 -0000 1.134
+++ Changes 27 May 2004 09:05:04 -0000 1.135
@@ -8,6 +8,9 @@
=item 1.12-dev
+add skip_reason() to Apache::Test, which provides a mechanism for
+user-specified skip messages [Geoffrey Young]
+
=item 1.11 - May 21, 2004
Tweak Apache::TestRun to support test filenames starting with
1.81 +29 -2 httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm
Index: Test.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- Test.pm 21 May 2004 18:29:51 -0000 1.80
+++ Test.pm 27 May 2004 09:05:05 -0000 1.81
@@ -29,7 +29,7 @@
have_cgi have_access have_auth have_module have_apache
have_min_apache_version have_apache_version have_perl
have_min_perl_version have_min_module_version
- have_threads under_construction have_apache_mpm);
+ have_threads under_construction skip_reason have_apache_mpm);
# everything but ok(), skip(), and plan() - Test::More provides these
my @test_more_exports = grep { ! /^(ok|skip|plan)$/ } @EXPORT;
@@ -391,6 +391,14 @@
return 0;
}
+sub skip_reason {
+ my $reason = shift || 'no reason specified';
+ push @SkipReasons, $reason;
+ return 0;
+}
+
+# normalize Apache-sytle version strings (2.0.48, 0.9.4)
+
# normalize Apache-sytle version strings (2.0.48, 0.9.4)
# for easy numeric comparison. note that 2.1 and 2.1.0
# are considered equivalent.
@@ -537,7 +545,9 @@
Functions that can be used as a last argument to the extended plan():
-=over have_http11
+=over
+
+=item have_http11
plan tests => 5, &have_http11;
@@ -710,6 +720,23 @@
reference, but be careful that the keys will be different.
Also see plan().
+
+=item under_construction
+
+ plan tests => 5, under_construction;
+
+skip all tests, noting that the tests are under construction
+
+=item skip_reason
+
+ plan tests => 5, skip_reason('my custom reason');
+
+skip all tests. the reason you specify will be given at runtime.
+if no reason is given a default reason will be used.
+
+=back
+
+=head1 Additional Configuration Variables
=item config