[Jifty-commit] r3815 - in Test-WWW-Declare: lib/Test/WWW
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Aug 6 15:12:41 EDT 2007
Author: sartak
Date: Mon Aug 6 15:12:41 2007
New Revision: 3815
Modified:
Test-WWW-Declare/ (props changed)
Test-WWW-Declare/lib/Test/WWW/Declare.pm
Log:
r29967 at caladan: sartak | 2007-08-06 15:12:17 -0400
Attempt to handle nested flows
Modified: Test-WWW-Declare/lib/Test/WWW/Declare.pm
==============================================================================
--- Test-WWW-Declare/lib/Test/WWW/Declare.pm (original)
+++ Test-WWW-Declare/lib/Test/WWW/Declare.pm Mon Aug 6 15:12:41 2007
@@ -13,6 +13,7 @@
never always lack lacks);
our $BUILDER = Test::Builder->new();
our $WWW_MECHANIZE;
+our $IN_FLOW;
our %mechs;
=begin private
@@ -278,13 +279,22 @@
my $name = shift;
my $coderef = shift;
- eval { $coderef->() };
+ eval { local $IN_FLOW = 1; $coderef->() };
if ($@ =~ /^SKIP: (.*)$/) {
my $reason = $1;
$BUILDER->skip($reason);
}
elsif ($@) {
+ if ($IN_FLOW) {
+ #$BUILDER->ok(0, $name);
+ if ($@ !~ /^Flow '/) {
+ Carp::croak "Flow '$name' failed: $@";
+ }
+
+ die "$@\n";
+ }
+
$BUILDER->ok(0, $name);
$BUILDER->diag($@);
}
@@ -300,7 +310,7 @@
$mechs{$title} ||= Test::WWW::Mechanize->new();
local $WWW_MECHANIZE = $mechs{$title};
- eval { $coderef->() };
+ $coderef->();
if ($@ =~ /^SKIP: (.*)$/) {
my $reason = $1;
More information about the Jifty-commit
mailing list