On Monday, June 30, 2003, at 11:26  AM, Geoffrey Young wrote:

this makes 'make test' echo the error string or run the tests, depending on whether A::T is installed. in either case, 'make test' is successful (I hope :)

Looks like it would be. I decided to use a different approach. Since some of the tests in my test suite don't require Apache::Test, I simply added this code to those that do require it:


BEGIN{
    if (eval {require Apache::Test}) {
        Apache::Test->import(qw(have_lwp plan));
        require Apache::TestRequest;
        Apache::TestRequest->import(qw(GET POST));
        plan tests => 43, have_lwp;
    } else {
        plan skip_all => 'Apache::Test required to run tests.';
    }
}

So the test suite still runs in Test::Harness, but all the tests are skipped.

Hope this can help others.

Regards,

David

--
David Wheeler                                     AIM: dwTheory
[EMAIL PROTECTED]                              ICQ: 15726394
http://kineticode.com/                         Yahoo!: dew7e
                                               Jabber: [EMAIL PROTECTED]
Kineticode. Setting knowledge in motion.[sm]



Reply via email to