Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #36247] [PATCH] added todo to Parrot::Test::PGE

5 views
Skip to first unread message

Dino Morelli

unread,
Jun 11, 2005, 11:56:58 AM6/11/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Dino Morelli
# Please include the string: [perl #36247]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36247 >


I added support to Parrot::Test::PGE for chromatic's new todo feature of
the unit testing code.

files:

lib/Parrot/Test/PGE.pm
All three functions support the optional todo. p6rule_is(),
p6rule_isnt(), p6rule_like()

lib/Parrot/Test.pm
SEE BELOW

t/p6rules/ws.t
Uncommented existing future tests and added todo args to them.


*** to chromatic: ***
I had to make a change to Parrot::Test

Index: lib/Parrot/Test.pm
===================================================================
--- lib/Parrot/Test.pm (revision 8301)
+++ lib/Parrot/Test.pm (working copy)
@@ -430,7 +430,7 @@
}

# set a TODO for Test::Builder to find
- my $call_pkg = $builder->exported_to();
+ my $call_pkg = $builder->exported_to() || '';
local *{ $call_pkg . '::TODO' } = \$extra{todo}
if defined $extra{todo};
===================================================================

Without this change, this comes out of Parrot::Test when invoked from
Parrot::Test::PGE with todo args:

"Use of uninitialized value in concatenation (.) or string at
lib/Parrot/Test.pm line 434."

I looked at it for a while but am somewhat confused about why this
exported_to() is returning undef. I'm not sure this || '' was the way to
fix it and am asking you to weigh in on it.


Thanks for implementing the todo and thanks for taking a look at this
issue.


-Dino

--
.~. Dino Morelli
/V\ email: dmor...@reactorweb.net
/( )\ weblog: http://categorically.net/d/blog/
^^-^^ preferred distro: Debian GNU/Linux http://www.debian.org

Parrot-Test-PGE_pm.patch
Parrot-Test_pm.patch
p6rules-ws_t.patch
0 new messages