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

[perl #41187] [PATCH] fix failed test t/examples/past.t

4 views
Skip to first unread message

Lee Duhem

unread,
Jan 5, 2007, 7:14:38 AM1/5/07
to bugs-bi...@rt.perl.org
# New Ticket Created by "Lee Duhem"
# Please include the string: [perl #41187]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41187 >


After update to 16418, test t/examples/past.t failed:

$ /usr/local/bin/perl t/harness --gc-debug --running-make-test -b t/examples/past.t
t/examples/past....
# Failed test (t/examples/past.t at line 63)
# got: '
# .sub "foo"
# new $P10, .Integer
# assign $P10, 4
# clone $P10, $P10
# set_global "$a", $P10
# get_global $P11, "$a"
# new $P12, .Integer
# assign $P12, 1
# new $P13, .Undef
# add $P13, $P11, $P12
# clone $P13, $P13
# set_global "$b", $P13
# get_global $P14, "$b"
# $P15 = "say"($P14)
# .return ($P15)
# .end
# 5
# '
# expected: '
# .sub "foo"
# new $P10, .Integer
# assign $P10, 4
# clone $P10, $P10
# set_global "$a", $P10
# get_global $P11, "$a"
# new $P12, .Integer
# assign $P12, 1
# new $P13, .Undef
# add $P13, $P11, $P12
# clone $P13, $P13
# set_global "$b", $P13
# get_global $P14, "$b"
# $P15 = "say"($P14)
# .return ($P15)
# .end
# 5
# '
# Looks like you failed 1 test of 1.

After check output of C<t/examples/past.t> under C<trace 1>, I find this
failure because

set_args PC356 (5), P2, "\n.sub %0 %1 %2", S1, S3, S4 PC356=FixedIntegerArray=PMC(0x81dcaec) P2=Object(PGE::CodeString)=PMC(0x84217ac) S1="\"foo\"" S3="" S4=""

so at the end of line 42 of C<t/examples/past.t> need append two spaces,
the attached patch just do this.

But I think that there must be something better we can do!

Lee

past.patch
0 new messages