"Fossies" - the Fresh Open Source Software Archive

Member "mod_perl-2.0.11/t/hooks/hookrun.t" (5 Oct 2019, 786 Bytes) of package /linux/www/apache_httpd_modules/mod_perl-2.0.11.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "hookrun.t": 2.0.8_vs_2.0.9.

    1 # please insert nothing before this line: -*- mode: cperl; cperl-indent-level: 4; cperl-continued-statement-offset: 4; indent-tabs-mode: nil -*-
    2 use strict;
    3 use warnings FATAL => 'all';
    4 
    5 use Apache::Test;
    6 use Apache::TestUtil;
    7 use Apache::TestRequest;
    8 
    9 my $module = 'TestHooks::hookrun';
   10 my $config = Apache::Test::config();
   11 my $path = Apache::TestRequest::module2path($module);
   12 
   13 Apache::TestRequest::module($module);
   14 my $hostport = Apache::TestRequest::hostport($config);
   15 t_debug("connecting to $hostport");
   16 
   17 plan tests => 10;
   18 
   19 my $ret = GET "http://$hostport/$path?die";
   20 ok t_cmp $ret->code, 500, '$r->die';
   21 
   22 my $body = GET_BODY_ASSERT "http://$hostport/$path?normal";
   23 for my $line (split /\n/, $body) {
   24     my ($phase, $value) = split /:/, $line;
   25     ok t_cmp $value, 1, "$phase";
   26 }