Hurm. this didn't make it to the list - Stripping out the attachments, see http://rt.perl.org/rt3/Ticket/Display.html?id=28035 for those.

Regards.

Begin forwarded message:

With input (and some code, thanks!) from J�r�me, I've made some progress here. Both tcl and befunge should shortly be happily using the new framework.

Sorry about the jumble of files. ^_^

After applying all the attached patches, "cd languages; make test" will use "testall" to run the individual language/$foo/t/harnesses.

languages/testall -

config/gen/makefiles/language.in -


These harnesses should return a list of files to test when run with the argument "-files". This is how the encompassing harness will know what to run.


I've modified Parrot::Test so that it's more agnostic about where the tests are run from, which allowed me to get rid of "languages/tcl/run_pir.pm" (only 1/1468 tests fail if you ignore the manifest error in my local copy). I tried to make it more portable at the same time, following J�r�me's lead.

lib/Parrot/Test.pm -


I've also added a function to Parrot::Test called "language_output_is" - called like:


language_output_is('tcl', $tcl, $expected, 'noarg');

Parrot::Test uses the first arg to figure out where to delegate the call to. There's currently one additional Test module, Parrot::Test::Tcl, which defines the method "output_is" - this method is pretty similar to Parrot::Test:pir_output_is, and cribs what it can from Parrot::Test. This gets rid of t/languages/tcl/run_tcl.pm

lib/Parrot/Test/Tcl.pm -

I'm not entirely happy with the way Parrot::Test and Parrot::Test::Tcl interact, so if someone wants to clean it up, great. There's also a bug in that when I call Parrot::Test's _run_command, I can't redirect both STDERR and STDOUT to the output file, so for now, we just send STDOUT.

Here's an additional tarball that switch over Tcl to use the new scheme, and a MANIFEST patch that covers all the files here.


Should be able to just replace any existing tcl files with the new ones.



--
Will "Coke" Coleda will at coleda dot com


Reply via email to