[Rt-commit] rt branch, 4.4/test-fail-content-dump, updated. rt-4.4.0rc1-6-g4cc28cd
Shawn Moore
shawn at bestpractical.com
Tue Nov 17 13:04:19 EST 2015
The branch, 4.4/test-fail-content-dump has been updated
via 4cc28cdec9d71ada810fc6dc387bfda35452dd11 (commit)
via 66f611147239f4e03712922ce2141e69825e5205 (commit)
from 8d449b6dd242be4daabcf317145f139a73ad5b8d (commit)
Summary of changes:
lib/RT/Test/Web.pm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 66f611147239f4e03712922ce2141e69825e5205
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Tue Nov 17 18:03:37 2015 +0000
If the regex fails to match, the request was for / so sub in index.html
diff --git a/lib/RT/Test/Web.pm b/lib/RT/Test/Web.pm
index 7f2b9c7..1818a13 100644
--- a/lib/RT/Test/Web.pm
+++ b/lib/RT/Test/Web.pm
@@ -447,6 +447,8 @@ for my $method_name (qw/
if (!$ok) {
my $dir = RT::Test->temp_directory;
my ($name) = $self->uri =~ m{/([^/]+)$};
+ $name ||= 'index.html';
+
my $file = $dir . '/' . RT::Test->builder->current_test . '-' . $name;
open my $handle, '>', $file or die $@;
commit 4cc28cdec9d71ada810fc6dc387bfda35452dd11
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Tue Nov 17 18:04:06 2015 +0000
Use the right error var, oops
diff --git a/lib/RT/Test/Web.pm b/lib/RT/Test/Web.pm
index 1818a13..5c2d441 100644
--- a/lib/RT/Test/Web.pm
+++ b/lib/RT/Test/Web.pm
@@ -451,9 +451,9 @@ for my $method_name (qw/
my $file = $dir . '/' . RT::Test->builder->current_test . '-' . $name;
- open my $handle, '>', $file or die $@;
- print $handle $self->content or die $@;
- close $handle or die $@;
+ open my $handle, '>', $file or die $!;
+ print $handle $self->content or die $!;
+ close $handle or die $!;
Test::More::diag("Dumped failing test page content to $file");
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list