On Mon, Oct 10, 2005 at 10:53:34PM +0200, Shlomi Fish wrote:
> Let me know what you think.
$ perl -Ilib -wle 'use Test::Shlomif::Harness::Obj;
Test::Shlomif::Harness::Obj->new->runtests(test_files => [EMAIL PROTECTED])'
t/*.t
Can't use an undefined value as an ARRAY reference at
lib/Test/Shlomif/Harness/Obj.pm line 715.
runtests() is not doing anything with its arguments and neither is
_run_all_tests() so $self->test_files is undefined. In fact, there's a
few places where you code waffles between getting information from the
object and from its arguments. _leader_width, for example, gets its
test_files from its arguments even though it should be available on the
object.
Moving along, here's what happens on a simple test failure.
$ perl -Ilib -wle 'use Test::Shlomif::Harness::Obj; $t =
Test::Shlomif::Harness::Obj->new; $t->test_files([EMAIL PROTECTED]);
$t->runtests()' t/fail.t
t/fail....NOK 1
# Failed test in t/fail.t at line 4.
# Looks like you failed 1 test of 1.
t/fail....dubious
Test returned status 1 (wstat 256, 0x100)
DIED.
Undefined format "STDOUT" called at lib/Test/Shlomif/Harness/Obj.pm line 842.
It appears all that nasty format code that we hate in Test::Harness has
gone missing yet _fail_other() still tries to use it.
The way you've broken down the nattier bits of Test::Harness, such as
_show_results(), into digestable functions has value. I'd like to see
that sort of thing as patches to Test::Harness rather than in a fork.
Also using an object *internally* makes sense. Cleans up having to pass
%tot and %test around all over. An external object interface will require
a lot more thought.
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern
Ahh email, my old friend. Do you know that revenge is a dish that is best
served cold? And it is very cold on the Internet!