Re: Test::Harness Extension/Replacement with Color Hilighting
On Fri, Sep 16, 2005 at 03:55:15AM +0300, Shlomi Fish wrote: Thus, it seems the best option if we want to make sure Test::Harness is custmisable in this and other ways is to spin it off and create a better and more customizable test harnessing module, with an incompatible interface. Another option is to create an environment variable triggered option for this and future features, but that would be Evil. Mr. Lester, would you approve of a friendly spin-off of Test::Harness? Another option would be to use Test::Harness::Straps. This seems a lot more easy than trying to write your own harness. Since its already included with recent Perls, that seems to make more sense than writing your own incompatible testing harness. Steve Peters [EMAIL PROTECTED]
Re: Test::Harness Extension/Replacement with Color Hilighting
On Fri, Sep 16, 2005 at 03:55:15AM +0300, Shlomi Fish ([EMAIL PROTECTED]) wrote: Mr. Lester, would you approve of a friendly spin-off of Test::Harness? Why are you asking if I approve? You can do whatever you like with the source code for Test::Harness. xoa -- Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance
Re: Test::Harness Extension/Replacement with Color Hilighting
Andy Lester wrote: On Fri, Sep 16, 2005 at 03:55:15AM +0300, Shlomi Fish ([EMAIL PROTECTED]) wrote: Mr. Lester, would you approve of a friendly spin-off of Test::Harness? Why are you asking if I approve? You can do whatever you like with the source code for Test::Harness. I think a polite question is wonderful (with potential answers ranging from sure to hey, that's a cool idea, let's try a merge instead of a fork). After the recent CPANPLUS::Dist::Build debacle, a little politeness in the community is nice to see. David Golden
Re: Test::Harness Extension/Replacement with Color Hilighting
On Fri, Sep 16, 2005 at 11:35:05AM -0400, David Golden ([EMAIL PROTECTED]) wrote: I think a polite question is wonderful (with potential answers ranging from sure to hey, that's a cool idea, let's try a merge instead of a fork). Sure, it's a polite question, but an unnecessary one. He can do whatever he likes with the source. Just color me skeptical. As soon as there's something tangible for me to say Hey, let's try a merge instead of a fork about. Email lists make it easy for people to say hey I've got this great idea, and people to pile on and say That's good, that's bad and we're left with a lot of hot air and precious little code. So, Shlomi: Show me the code. -- Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance
Re: Test::Harness Extension/Replacement with Color Hilighting
Alls you need to do is call: ($tot, $failedtests) = Test::Harness::_run_all_tests(@tests); instead of 'run_tests' to get at the '$tot' '$failedtest' hash refs (Data::Dumper it or look at the comments in Test::Harness) which has all the info you need to output whatever/however you want - I use it to XML-ize Test::Harness output instead of the standard format. This also avoids the call to '_show_results' (or you can call it yourself later) so you can output whatever/however you want. Mark Andy Lester wrote: On Fri, Sep 16, 2005 at 11:35:05AM -0400, David Golden ([EMAIL PROTECTED]) wrote: I think a polite question is wonderful (with potential answers ranging from sure to hey, that's a cool idea, let's try a merge instead of a fork). Sure, it's a polite question, but an unnecessary one. He can do whatever he likes with the source. Just color me skeptical. As soon as there's something tangible for me to say Hey, let's try a merge instead of a fork about. Email lists make it easy for people to say hey I've got this great idea, and people to pile on and say That's good, that's bad and we're left with a lot of hot air and precious little code. So, Shlomi: Show me the code.
Re: Test::Harness Extension/Replacement with Color Hilighting
On Friday 16 September 2005 04:40, Steve Peters wrote: On Fri, Sep 16, 2005 at 03:55:15AM +0300, Shlomi Fish wrote: Thus, it seems the best option if we want to make sure Test::Harness is custmisable in this and other ways is to spin it off and create a better and more customizable test harnessing module, with an incompatible interface. Another option is to create an environment variable triggered option for this and future features, but that would be Evil. Mr. Lester, would you approve of a friendly spin-off of Test::Harness? Another option would be to use Test::Harness::Straps. This seems a lot more easy than trying to write your own harness. Since its already included with recent Perls, that seems to make more sense than writing your own incompatible testing harness. From a brief inspection of Test::Harness::Straps it seems that it doesn't give all the necessary functionality. Some logic is still present only in Test::Harness which makes uses of T::H::S. Regards, Shlomi Fish - Shlomi Fish [EMAIL PROTECTED] Homepage:http://www.shlomifish.org/ 95% of the programmers consider 95% of the code they did not write, in the bottom 5%.
Re: Test::Harness Extension/Replacement with Color Hilighting
On Friday 16 September 2005 19:34, Mark Ethan Trostler wrote: Alls you need to do is call: ($tot, $failedtests) = Test::Harness::_run_all_tests(@tests); instead of 'run_tests' to get at the '$tot' '$failedtest' hash refs (Data::Dumper it or look at the comments in Test::Harness) which has all the info you need to output whatever/however you want - I use it to XML-ize Test::Harness output instead of the standard format. This also avoids the call to '_show_results' (or you can call it yourself later) so you can output whatever/however you want. Hmmm... I've inspected the Test::Harness source now. While one can indeed do what you said, if I want to emulate the functionality of _show_results in its entirety, except for a small difference, then I'll have to duplicate a lot of code. That's Not Goodtm. So I think a spin-off of Test::Harness which will facilitate doing that is still in order. Regards, Shlomi Fish Mark Andy Lester wrote: On Fri, Sep 16, 2005 at 11:35:05AM -0400, David Golden ([EMAIL PROTECTED]) wrote: I think a polite question is wonderful (with potential answers ranging from sure to hey, that's a cool idea, let's try a merge instead of a fork). Sure, it's a polite question, but an unnecessary one. He can do whatever he likes with the source. Just color me skeptical. As soon as there's something tangible for me to say Hey, let's try a merge instead of a fork about. Email lists make it easy for people to say hey I've got this great idea, and people to pile on and say That's good, that's bad and we're left with a lot of hot air and precious little code. So, Shlomi: Show me the code. -- - Shlomi Fish [EMAIL PROTECTED] Homepage:http://www.shlomifish.org/ 95% of the programmers consider 95% of the code they did not write, in the bottom 5%.
Re: Test::Harness Extension/Replacement with Color Hilighting
-BEGIN PGP SIGNED MESSAGE- Moin, On Friday 16 September 2005 19:44, Shlomi Fish wrote: On Friday 16 September 2005 19:34, Mark Ethan Trostler wrote: Alls you need to do is call: ($tot, $failedtests) = Test::Harness::_run_all_tests(@tests); instead of 'run_tests' to get at the '$tot' '$failedtest' hash refs (Data::Dumper it or look at the comments in Test::Harness) which has all the info you need to output whatever/however you want - I use it to XML-ize Test::Harness output instead of the standard format. This also avoids the call to '_show_results' (or you can call it yourself later) so you can output whatever/however you want. Hmmm... I've inspected the Test::Harness source now. While one can indeed do what you said, if I want to emulate the functionality of _show_results in its entirety, except for a small difference, then I'll have to duplicate a lot of code. That's Not Goodtm. So I think a spin-off of Test::Harness which will facilitate doing that is still in order. Why not fix Test::Harness instead of re-inventing it entirely? Best wishes, Tels - -- Signed on Fri Sep 16 19:57:37 2005 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. The campaign should combat the messages of pornography by putting signs on buses saying sex with children is not OK. -- Mary Anne Layden in ttp://tinyurl.com/6a9cy -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iQEVAwUBQysHu3cLPEOTuEwVAQHJWwf+J/oro0TGsR684rUYoSPZae7HWH2ccXED EhKR3bHRXVAFhz490+yWaajYQ88FMfYObH90dPOPDTKKJyHgGqmzC6awswuZlchX GalceBaQyU77yhLn3D5lLo/v/Cx+Xa99sO9/K8OMGbrphSUOj6xqKm615Ts6xHsL vpALbXG3ztYFRWowzGRWj8sjy6dyGYlDYx0De3jLXtavBeYITLNLf2v38axgEl6x IHn+ycSkgZJkxGhjEa2+83gVbUpQp4EFsEgZGpBNVmpoy/EtARFx0i/A74VoQWoC DksImhKs8vP+kOerqGOH/yLTn9o1XO1dI3/5KnSNqFnbFn+7kE1a+g== =5wa9 -END PGP SIGNATURE-
Re: Test::Harness Extension/Replacement with Color Hilighting
--- Tels [EMAIL PROTECTED] wrote: So I think a spin-off of Test::Harness which will facilitate doing that is still in order. Why not fix Test::Harness instead of re-inventing it entirely? That's my thought. It's been known for a long time that Test::Harness works well, but only for the specific task it's been designed for. There's been a lot of discussion about improving/extending it. This is a much better solution than making a fork for a feature that's likely not compelling enough for folks to make the switch. Don't get me wrong. I also want color highlighting of test code. However, there's a lot more stuff I would like to do with the test output (imagine a Wx extension that provides the red/green color bars that JUnit provides). By fixing Test::Harness, we get a more general case solution and everybody wins. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
Re: Test::Harness Extension/Replacement with Color Hilighting
Shlomi Fish wrote: Hi all! Does anyone know of a Test::Harness extension or replacement that can color the final report line in green if all tests passed and in red otherwise? search.cpan.org is no help, and couldn't find anything relevant by a brief scanning of its POD page there (but not a thorough reading of it). I'd like to be able to use it without requiring the module's user to install it, just using it on my local configuration. The Test::Builder::Tester distribution includes Test::Builder::Tester::Color. That might be useful - or might serve as a good basis to build something on. Dave...
Re: Test::Harness Extension/Replacement with Color Hilighting
On Mon, Sep 05, 2005 at 10:58:17AM +0100, Dave Cross wrote: Shlomi Fish wrote: Hi all! Does anyone know of a Test::Harness extension or replacement that can color the final report line in green if all tests passed and in red otherwise? search.cpan.org is no help, and couldn't find anything relevant by a brief scanning of its POD page there (but not a thorough reading of it). I'd like to be able to use it without requiring the module's user to install it, just using it on my local configuration. The Test::Builder::Tester distribution includes Test::Builder::Tester::Color. That might be useful - or might serve as a good basis to build something on. See also Apache::Test. http://perl.apache.org/docs/general/testing/testing.html#Colored_Trace_Mode -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net