You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2002/05/14 17:47:12 UTC

cvs commit: modperl-2.0/ModPerl-Registry/t special_blocks.t

stas        02/05/14 08:47:12

  Modified:    ModPerl-Registry/t/cgi-bin special_blocks.pl
               ModPerl-Registry/t special_blocks.t
  Log:
  - use Apache::RequestRec
  - move away from Apache::compat, meaning $r->args is a string
  
  Revision  Changes    Path
  1.3       +3 -3      modperl-2.0/ModPerl-Registry/t/cgi-bin/special_blocks.pl
  
  Index: special_blocks.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/cgi-bin/special_blocks.pl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- special_blocks.pl	21 Oct 2001 06:58:24 -0000	1.2
  +++ special_blocks.pl	14 May 2002 15:47:12 -0000	1.3
  @@ -1,6 +1,7 @@
   #!perl -w
   
   # test BEGIN/END blocks
  +use Apache::RequestRec ();
   
   use vars qw($query);
   $query = '' unless defined $query;
  @@ -12,8 +13,7 @@
   print "Content-type: text/plain\r\n\r\n";
   
   my $r = shift;
  -my %args = $r->Apache::args;
  -our $test = exists $args{test} ? $args{test} : '';
  +our $test = $r->args || '';
   
   if ($test eq 'uncache') {
       # mark the script as non-cached for the next execution
  @@ -21,7 +21,7 @@
       ModPerl::RegistryCooker::uncache_myself();
   }
   elsif ($test eq 'begin') {
  -    print "begin ok" if $query eq 'test=begin';
  +    print "begin ok" if $query eq 'begin';
       # reset the global
       $query = '';
   }
  
  
  
  1.3       +10 -10    modperl-2.0/ModPerl-Registry/t/special_blocks.t
  
  Index: special_blocks.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/special_blocks.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- special_blocks.t	21 Oct 2001 06:53:28 -0000	1.2
  +++ special_blocks.t	14 May 2002 15:47:12 -0000	1.3
  @@ -27,25 +27,25 @@
   
       ok t_cmp(
                "begin ok",
  -             req($same_interp, "$url?test=begin"),
  +             req($same_interp, "$url?begin"),
                "$modules{$alias} is running BEGIN blocks on the first req",
               );
   
       ok t_cmp(
                "begin ok",
  -             req($same_interp, "$url?test=begin"),
  +             req($same_interp, "$url?begin"),
                "$modules{$alias} is running BEGIN blocks on the second req",
               );
   
       ok t_cmp(
                "end ok",
  -             req($same_interp, "$url?test=end"),
  +             req($same_interp, "$url?end"),
                "$modules{$alias} is running END blocks on the first req",
               );
   
       ok t_cmp(
                "end ok",
  -             req($same_interp, "$url?test=end"),
  +             req($same_interp, "$url?end"),
                "$modules{$alias} is running END blocks on the second req",
               );
   }
  @@ -60,32 +60,32 @@
       my $same_interp = Apache::TestRequest::same_interp_tie($url);
   
       # clear the cache of the registry package for the script in $url
  -    req($same_interp, "$url?test=uncache");
  +    req($same_interp, "$url?uncache");
   
       ok t_cmp(
                "begin ok",
  -             req($same_interp, "$url?test=begin"),
  +             req($same_interp, "$url?begin"),
                "$modules{$alias} is running BEGIN blocks on the first req",
               );
   
       ok t_cmp(
                "",
  -             req($same_interp, "$url?test=begin"),
  +             req($same_interp, "$url?begin"),
                "$modules{$alias} is not running BEGIN blocks on the second req",
               );
   
       # clear the cache of the registry package for the script in $url
  -    req($same_interp, "$url?test=uncache");
  +    req($same_interp, "$url?uncache");
   
       ok t_cmp(
                "end ok",
  -             req($same_interp, "$url?test=end"),
  +             req($same_interp, "$url?end"),
                "$modules{$alias} is running END blocks on the first req",
               );
   
       ok t_cmp(
                "end ok",
  -             req($same_interp, "$url?test=end"),
  +             req($same_interp, "$url?end"),
                "$modules{$alias} is running END blocks on the second req",
               );