[jifty-devel] make test in SVN version has plenty of test failures
Andreas J. Koenig
andreas.koenig.7os6VVqR at franz.ak.mind.de
Thu May 17 15:02:03 EDT 2007
>>>>> On Thu, 17 May 2007 12:35:42 -0400, Kevin Falcone <falcone at bestpractical.com> said:
> On May 17, 2007, at 11:23 AM, Andreas J. Koenig wrote:
>> I was trying SVN rev 3242 of Jifty today.
>>
>> When I understand the output correctly all failures are exactly the
>> same: somebody cannot find the testfile that is being run. Maybe some
>> chdir or some ripping apart of $0 or some such. The messages are all
>> like this one:
> This appears to be a new feature of WWW::Mechanize 1.26
> Something to do with taintedness checks on content.
> 1.24 and 1.26 have broken various different things that
> I'm trying to figure out
Thanks for the context. The following patch makes all tests pass for
me (except the Pod::Coverage stuff which I ignore for now). It is
ugly, yes, but if the test suite does a chdir we must do something
about $0, too.
Index: t/TestApp/t/09-redirect.t
===================================================================
--- t/TestApp/t/09-redirect.t (revision 3242)
+++ t/TestApp/t/09-redirect.t (working copy)
@@ -10,7 +10,11 @@
=cut
-BEGIN {chdir "t/TestApp"}
+use File::Spec;
+BEGIN {
+ $0 = File::Spec->rel2abs($0);
+ chdir "t/TestApp";
+}
use lib '../../lib';
use Jifty::Test tests => 6;
use Jifty::Test::WWW::Mechanize;
Index: t/lib/Jifty/SubTest.pm
===================================================================
--- t/lib/Jifty/SubTest.pm (revision 3242)
+++ t/lib/Jifty/SubTest.pm (working copy)
@@ -4,6 +4,7 @@
use File::Spec;
BEGIN {
@INC = grep { defined } map { ref($_) ? $_ : File::Spec->rel2abs($_) } @INC;
+ $0 = File::Spec->rel2abs($0);
chdir "$FindBin::Bin/..";
}
--
andreas
More information about the jifty-devel
mailing list