[pugs] spurious successes in t/base/given.t

0 views
Skip to first unread message

Garrett Rooney

unread,
Mar 4, 2005, 8:55:58 PM3/4/05
to perl6-c...@perl.org
There are two unexpected successes in given.t (it must be my night for
finding things with that file...), but unfortunately they're not because
pugs is magically doing the right thing, they're because it's doing the
wrong thing in a way that exactly matches what the test is looking for,
if you get my meaning.

When the code

$expected = ($digit eq "T") ?? 10 :: 11;

is executed the second time through $expected is getting set to '', not
10 or 11. This means that later on the todo_ok tests succeed because
the results are (incorrectly) getting set to ''. Actually, the first
time through it's also wrong, $expected gets set to 1, which isn't right
either, it just doesn't show up as an unexpected success because the
results aren't 1.

The following patch alters the test to something that works with the
current version of pugs, although if we want to truly copy the example
from apoc 4 it should probably go back once the problem is fixed.

-garrett

given-todo-spurious.diff

Luke Palmer

unread,
Mar 4, 2005, 9:07:44 PM3/4/05
to Garrett Rooney, perl6-c...@perl.org
Garrett Rooney writes:
> There are two unexpected successes in given.t (it must be my night for
> finding things with that file...), but unfortunately they're not because
> pugs is magically doing the right thing, they're because it's doing the
> wrong thing in a way that exactly matches what the test is looking for,
> if you get my meaning.

Thanks, applied.

Luke

Reply all
Reply to author
Forward
0 new messages