tag 582915 patch thanks On Mon, May 24, 2010 at 05:09:08PM +0300, Niko Tyni wrote:
> # Failed test 'fetch_element with unexpected experience' > # at t/node.t line 125. > # expecting: Regexp ((?-xism:Unexpected experience)) > # found: Bizarre copy of ARRAY in sassign at /usr/share/perl/5.12/Carp.pm > line 95. This is caused by Test::Exception, and https://rt.cpan.org/Ticket/Display.html?id=55179 reports similar problems with the CPAN Carp-Diagnostic distribution. Possibly somebody should package http://search.cpan.org/dist/Test-Exception-LessClever/ which was apparently created to work around this precise bug. Meanwhile, the attached ugly patch works for me. -- Niko Tyni [email protected]
>From 93e7b766f2408dabc4a21e8ebb641b8bb36bfac4 Mon Sep 17 00:00:00 2001 From: Niko Tyni <[email protected]> Date: Mon, 24 May 2010 21:27:56 +0300 Subject: [PATCH] Work around a "Bizarre copy of ARRAY in sassign" with Perl 5.12.x Test::Exception does nasty things with the stack, triggering what seems to be a bug in newer Perl versions. http://rt.perl.org/rt3/Public/Bug/Display.html?id=52610 https://rt.cpan.org/Ticket/Display.html?id=55179 http://bugs.debian.org/582915 Simplify the test as a workaround. --- t/node.t | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/node.t b/t/node.t index 5ccabcd..6a59654 100644 --- a/t/node.t +++ b/t/node.t @@ -121,8 +121,8 @@ is($b->get_element_property(property => 'experience',element => 'X'), is( $b->fetch_element_value('Z'), undef, "test Z value" ); -throws_ok {$b->fetch_element('Z','user')} - qr/Unexpected experience/, "fetch_element with unexpected experience" ; +eval {$b->fetch_element('Z','user')}; +like($@, qr/Unexpected experience/, "fetch_element with unexpected experience" ); # translated into beginner throws_ok { $b->fetch_element('X','beginner'); } -- 1.7.1

