On Mon, 13 Aug 2001, Stas Bekman wrote:
 
> I've this:
> 
> t/modules/PerlRequire.t
> t/response/TestModules/PerlRequire.pm

if you do 'find t/ -name "*.pm"' you'll see every .pm is lowercase, as are
all .t files.  the lowercase is also forced as part of the naming
convention, you know how i like lowercase :)
 
> 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.

sure.  to make it super generic, how about if a test .pm could have a 
'sub CONFIGURE {}', which is passed the Apache::TestConfig object when
configuration is generated?  then you have access to all the directory
info, gendir(), genfile() and things like that.  the trick would be that
most .pm tests will currently only run inside the server so for the
moment you'd need to open the .pm, read in just the CONFIGURE part and
eval it.

> 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.

i very much like having one .t and one .pm too.  hopefully in the long run
will make things easier to debug, once we get all this auto-generated-
do-exactly-what-i-want stuff right.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to