Thanks for the reply...
Your subtest is simply an anonymous routine which does not take any parameters. To properly illustrate what I wanted perhaps the code below will clarify....
I would like to pass $xml as a variable (plus other test parameters) to the subtest. I think the original fudge poster was close as it looks as though having a "fudge wrapper" is the only way this can be achieved. I did wonder if there was a more direct method or whether subtest passed on additional params to "my_subtest".my $xml; sub my_subtest { like( $xml, qr/xml version=/, "XML Document"); # more tests on XML document text here.... } $xml = MyPackage::method1(); subtest 'Checking XML from method1' => \&my_subtest; $xml = MyPackage::method2(); subtest 'Checking XML from method2...' => \&my_subtest;
In reply to Re^2: Test::More subtest parameters
by space_monk
in thread Test::More subtest parameters
by space_monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |