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 2003/11/23 22:01:50 UTC

cvs commit: modperl-2.0/ModPerl-Registry/t/cgi-bin basic.pl

stas        2003/11/23 13:01:50

  Modified:    ModPerl-Registry/t basic.t redirect.t
               ModPerl-Registry/t/cgi-bin basic.pl
  Log:
  test that $0 is set to the path to the script
  
  Revision  Changes    Path
  1.15      +6 -1      modperl-2.0/ModPerl-Registry/t/basic.t
  
  Index: basic.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/basic.t,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -u -r1.14 -r1.15
  --- basic.t	1 Apr 2003 04:18:49 -0000	1.14
  +++ basic.t	23 Nov 2003 21:01:50 -0000	1.15
  @@ -6,6 +6,8 @@
   use Apache::TestRequest qw(GET GET_BODY HEAD);
   use Apache::TestConfig ();
   
  +use File::Spec::Functions qw(catfile);
  +
   my %modules = (
       registry    => 'ModPerl::Registry',
       registry_bb => 'ModPerl::RegistryBB',
  @@ -16,12 +18,15 @@
   
   plan tests => @aliases * 4 + 3;
   
  +my $vars = Apache::Test::config()->{vars};
  +my $script_file = catfile $vars->{serverroot}, 'cgi-bin', 'basic.pl';
  +
   # very basic compilation/response test
   for my $alias (@aliases) {
       my $url = "/$alias/basic.pl";
   
       ok t_cmp(
  -        "ok",
  +        "ok $script_file",
           GET_BODY($url),
           "$modules{$alias} basic cgi test",
       );
  
  
  
  1.6       +5 -2      modperl-2.0/ModPerl-Registry/t/redirect.t
  
  Index: redirect.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/redirect.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- redirect.t	12 Aug 2003 21:06:40 -0000	1.5
  +++ redirect.t	23 Nov 2003 21:01:50 -0000	1.6
  @@ -5,18 +5,21 @@
   use Apache::TestUtil;
   use Apache::TestRequest qw(GET_BODY HEAD);
   
  +use File::Spec::Functions qw(catfile);
  +
   plan tests => 4, have_lwp;
   
   # need LWP to handle redirects
  -
   my $base_url = "/registry/redirect.pl";
   
   {
       my $redirect_path = "/registry/basic.pl";
       my $url = "$base_url?$redirect_path";
  +    my $vars = Apache::Test::config()->{vars};
  +    my $script_file = catfile $vars->{serverroot}, 'cgi-bin', 'basic.pl';
   
       ok t_cmp(
  -        "ok",
  +        "ok $script_file",
           GET_BODY($url),
           "test redirect: existing target",
          );
  
  
  
  1.3       +1 -1      modperl-2.0/ModPerl-Registry/t/cgi-bin/basic.pl
  
  Index: basic.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/cgi-bin/basic.pl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- basic.pl	16 Aug 2002 10:11:39 -0000	1.2
  +++ basic.pl	23 Nov 2003 21:01:50 -0000	1.3
  @@ -3,7 +3,7 @@
   # test all the basic functionality
   
   print "Content-type: text/plain\n\n";
  -print "ok";
  +print "ok $0";
   
   __END__