Hi all,

This is probaby a weird request and it's something I could use, but not 
everyone will.  Further, it might require that Test::Harness be changed and I 
don't know if this is likely or reasonable.

Basically, when I run a single test, I do something like this:

  prove t/test_name.t

However, if I'm using Test::Class, I do something like this:

  prove t/test_class_tests.t

Typically, Test::Class tests have a wrapper script which loads the classes and 
runs the tests.  However, I have a different wrapper script 
(http://use.perl.org/~Ovid/journal/30510) which allows me to do this:

  perl t/test_class_tests.t path/to/test/class.pm

Instead of loading all classes, it merely loads the one class I want to test.  
This is handy when I'm working on a single class and I don't want to run all 
4,000 friggin' tests.

What I would prefer to do is something like this:

  prove t/test_class_tests.t path/to/test/class.pm

I want to do that so I can use Test::Harness, but the path is considered an 
argument to prove and not my Test::Class driver wrapper script.

>From what I can tell, Test::Harness doesn't support anything like this 
>directly and naturally prove doesn't either.  Can anyone make any 
>recommendations on a good approach here?  My ideas are terrible things like 
>setting environment variables and other things I would simply prefer to avoid.

Cheers,
Ovid
-- If this message is a response to a question on a mailing list, please send 
follow up questions to the list.
 
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/



Reply via email to