On Sun, 12 Aug 2001, Doug MacEachern wrote:
> On Sun, 12 Aug 2001, Stas Bekman wrote:
>
> > I've noticed that -clean will wipe out any tests that are going through
> > genfile() before starting the tests (which is ok). But in my case I didn't
> > want the test for PerlRequire be autogenerated.
>
> if it already exists, it won't be autogenerated.
true, but -clean wipes it out, so it gets regenerated.
> > I think PerlRequire response handler was the first one to have extra
> > configuration, but its own corresponding test, which is not
> > auto-generated. I was trying to find a way to keep my test there, but
> > couldn't find any existing support in the current code. So I've added a
> > new new WritePMTest directive which controls whether the corresponding
> > test should be autogenerated or not. The default is to yes. I've left more
> > space for feature control directives, so I didn't hardcode the test.
>
> you shouldn't need this.
> the design btw is to force a naming convention for .t's and coresponding
> .pm's, for example:
>
> % find t -name "*cgi*"
> t/apache/cgihandler.t
> t/modules/cgiupload.t
> t/modules/cgi.t
> t/response/TestApache/cgihandler.pm
> t/response/TestModules/cgiupload.pm
> t/response/TestModules/cgi.pm
>
> so you test should be layed out like so:
> t/modules/perlrequire.t
> t/response/TestModules/perlrequire.pm
I've this:
t/modules/PerlRequire.t
t/response/TestModules/PerlRequire.pm
which is consistent I think. I thought that using PerlRequire will be
clearer than perlrequire, in this particular case. So we can add other
directives tests as is.
> which it looks like you have, but PerlRequire instead of perlrequire.
> so i'm not following the problem. lets say you start with t/TEST -clean,
> add:
> t/modules/perlrequire.t
> t/response/TestModules/perlrequire.pm
>
> are you saying t/modules/perlrequire.t would get overwritten?
Didn't try with this combination, but with:
t/modules/PerlRequire.t
t/response/TestModules/PerlRequire.pm
it wipes t/modules/perlrequire.t and autogenerates one.
> > +++ t/lib/parent/PerlRequireTest.pm Sat Aug 11 19:08:20 2001
> > +++ t/lib/vh/PerlRequireTest.pm Sat Aug 11 19:08:20 2001
>
> i'd rather these live in the same area as the test .pm, like
> t/response/TestModules/parent
> t/response/TestModules/vhost
fine with me. I'd go even further and ask the following:
can we add a capability for .pm in t/response to generate things?
For example, rather having real parent/PerlRequireTest.pm and
vh/PerlRequireTest.pm, I think it'd be much clearer to have them all in
.pm file and somehow generated on the fly.
My perfect vision of a test is having everything in one file: .t, .pm and
any other parts, which makes it super easy to write new tests,
perception-wise. But of course harder to debug, so probably it's not an
option.
> in fact your new test should probably be in a new category for modperl
> specific feature tests:
> t/response/TestModperl/perlrequire.pm
> t/modperl/perlrequire.pm
OK, I'll add it.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]