Apache-Test

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

   (previously it was internally overriden for order!='random').
 o since IPC::Run3 broke the Ctrl-C handler, we started to loose any
   intermediate results, should the run be aborted. So for now, try to
   always store those results in the temp file:
   smoke-report...$iter.temp

fix 'require blib' in scripts to also call 'blib->import', required to
have an effect under perl 5.6.x. [Stas]

don't allow running an explicit 'perl Makefile.PL', when Apache-Test
is checked out into the modperl-2.0 tree, since it then decides that
it's a part of the modperl-2.0 build and will try to use modperl
httpd/apxs arguments which could be unset or wrong [Stas]

Fix skip test suite functionality in the interactive configuration
phase [Stas]

s/die/CORE::die/ after exec() to avoid warnings (and therefore
failures) when someone overrides CORE::die when using Apache-Test
[William McKee, Stas]

Changes  view on Meta::CPAN

($res->content() doesn't allow CODE refs anymore, instead used
content_ref to avoid huge strings copy) [Stas]

add @PHP_MODULE@ extra.conf.in substitution variable, which selects
mod_php4 or mod_php5 as appropriate.  [Geoffrey Young]

the have() function was removed entirely - use need() instead.
[Geoffrey Young]

add need() and need_* variant functions (need_module(), need_apache(),
etc) for use specifically with plan() to decide whether or not a test
should run.  have_* variants (have_module(), have_apache(), etc) are
now specifically for use outside of plan(), although they can continue
to be used within plan() without fear of current tests breaking.
[Geoffrey Young]

add need_php() and have_php() which will return true when either
mod_php4 or mod_php5 are available, providing functionality similar to 
need_cgi() and have_cgi().
[Geoffrey Young]

LICENSE  view on Meta::CPAN

      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this

lib/Apache/Test.pm  view on Meta::CPAN

If the first argument is an object, such as an C<Apache::RequestRec>
object, C<STDOUT> will be tied to it. The C<Test.pm> global state will
also be refreshed by calling C<Apache::Test::test_pm_refresh>. For
example:

    plan $r, tests => 7;

ties STDOUT to the request object C<$r>.

If there is a last argument that doesn't belong to C<Test::plan>
(which expects a balanced hash), it's used to decide whether to
continue with the test or to skip it all-together. This last argument
can be:

=over

=item * a C<SCALAR>

the test is skipped if the scalar has a false value. For example:

  plan tests => 5, 0;

lib/Apache/Test.pm  view on Meta::CPAN

exported.

=back

Functions that can be used as a last argument to the extended plan().
Note that for each C<need_*> function there is a C<have_*> equivalent
that performs the exact same function except that it is designed to
be used outside of C<plan()>.  C<need_*> functions have the side effect
of generating skip messages, if the test is skipped.  C<have_*> functions
don't have this side effect.  In other words, use C<need_apache()>
with C<plan()> to decide whether a test will run, but C<have_apache()>
within test logic to adjust expectations based on older or newer
server versions.

=over

=item need_http11

  plan tests => 5, need_http11;

Require HTTP/1.1 support.

lib/Apache/Test.pm  view on Meta::CPAN

           'cgid';

need() is more generic function which can impose multiple requirements
at once. All requirements must be satisfied.

need()'s argument is a list of things to test. The list can include
scalars, which are passed to need_module(), and hash references. If
hash references are used, the keys, are strings, containing a reason
for a failure to satisfy this particular entry, the values are the
condition, which are satisfaction if they return true. If the value is
0 or 1, it used to decide whether the requirements very satisfied, so
you can mix special C<need_*()> functions that return 0 or 1. For
example:

  plan tests => 1, need 'Compress::Zlib', 'deflate',
      need_min_apache_version("2.0.49");

If the scalar value is a string, different from 0 or 1, it's passed to
I<need_module()>.  If the value is a code reference, it gets executed
at the time of check and its return value is used to check the
condition. If the condition check fails, the provided (in a key)

lib/Apache/TestRun.pm  view on Meta::CPAN

            $conf_opts{$key} = Win32::GetShortPathName($conf_opts{$key});
        }
    }

    $opts{req_args} = \%req_args;

    # only test files/dirs if any at all are left in argv
    $self->{argv} = \@argv;

    # force regeneration of httpd.conf if commandline args want to
    # modify it. configure_opts() has more checks to decide whether to
    # reconfigure or not.
    # XXX: $self->passenv() is already tested in need_reconfiguration()
    $self->{reconfigure} = $opts{configure} ||
      (grep { $opts{$_}->[0] } qw(preamble postamble)) ||
        (grep { $Apache::TestConfig::Usage{$_} } keys %conf_opts ) ||
          $self->passenv() || (! -e 't/conf/httpd.conf');

    if (exists $opts{debug}) {
        $opts{debugger} = $opts{debug};
        $opts{debug} = 1;



( run in 0.271 second using v1.01-cache-2.11-cpan-de7293f3b23 )