httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher H. Laco" <apache-t...@chrislaco.com>
Subject Re: [PATCH] Test & TestRequest pod
Date Tue, 07 Dec 2004 00:59:01 GMT
Christopher H. Laco wrote:
> Christopher H. Laco wrote:
> 
>  > On that note, what else can I work on?
>  > Apparently I'm a glutton for punishment.
> 
> Not sure, there are all kind of things in the ToDo file, but they all
> mostly obscure.
> 
> I think all kind of refactoring would be great. One thing I wanted to do
> for tests again vhosts, is to add this function next to module2path():
> 
>    sub module2url {
>       my $module = shift;
>       my $scheme = shift || "http";
> 
>       Apache::TestRequest::module($module);
>       my $config   = Apache::Test::config();
>       my $hostport = Apache::TestRequest::hostport($config);
>       my $path     = Apache::TestRequest::module2path($module);
>       return "$scheme://$hostport$path";
>   }
> 
> and then replace the long craft used a lot in the modperl tests, so now
> one can write a simple:
> 
>    my $module = "Foo::bar";
>    {
>       my $path = Apache::TestRequest::module2path($module);
>       GET $path; # GET "/Foo__bar"
>    }
>    {
>      my $url      = Apache::TestRequest::module2url($module);
>      GET $url; # GET "http://localhost:8545/Foo__bar"
>    }
> 
> grep modperl-2.0/t for Apache::TestRequest::hostport to see what I'm
> talking about.
> 
> 

OK, not that I've got a clean nmake/nmake test, I'm back on this. I'm 
going to just start with t/modperl and go from there.

Since these patches will span A-T and modperl, should I send them 
seperately to both lists, of send both sets to one list of the other?

-=Chris


Mime
View raw message