Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to integrate other scripts with Test::Harness?

Reply
Thread Tools

How to integrate other scripts with Test::Harness?

 
 
yusuf
Guest
Posts: n/a
 
      08-07-2006
Hi,

I was trying to use Test::Harness to gather output from my bash scripts
as well, and I'm having problems with items being printed by the
script.

How do I get all stdout and stderr from the script to be just printed
by the Test::Harness, rather than disappearing?

Thanks.

 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      08-07-2006
yusuf wrote:

> I was trying to use Test::Harness to gather output from my bash scripts
> as well, and I'm having problems with items being printed by the
> script.
>
> How do I get all stdout and stderr from the script to be just printed
> by the Test::Harness, rather than disappearing?


In the past, you've been asked by several people - myself included - to
post a SHORT but COMPLETE script when you have difficulties. Why do
you continue to refuse to do that? Why do you continue to expect free
help without following even the most simple of requests?

Additionally, please read the documentation for the module you are
using. In this case, perldoc Test::Harness shows:
==============================
STOP! If all you want to do is write a test script, consider using
Test::Simple. Test::Harness is the module that reads the output from
Test::Simple, Test::More and other modules based on Test::Builder. You
don't need to know about Test::Harness to use those modules.

Test::Harness runs tests and expects output from the test in a certain
format. That format is called TAP, the Test Anything Protocol. It is
defined in Test::Harness::TAP.
==============================

So, are you sure you know what you're doing? Doesn't really sound like
your tests *should* be outputting anything other than TAP formatted
messages.

If you were to keep reading, you would find:
==============================
$Test::Harness::Verbose
The package variable $Test::Harness::Verbose is exportable and can be
used to let runtests() display the standard output of the script
without altering the behavior otherwise. The prove utility's -v flag
will set this.
===============================

Did you try that?

Paul Lalli

 
Reply With Quote
 
 
 
 
yusuf
Guest
Posts: n/a
 
      08-07-2006

Paul Lalli wrote:
> yusuf wrote:
>
> > I was trying to use Test::Harness to gather output from my bash scripts
> > as well, and I'm having problems with items being printed by the
> > script.
> >
> > How do I get all stdout and stderr from the script to be just printed
> > by the Test::Harness, rather than disappearing?

>
> In the past, you've been asked by several people - myself included - to
> post a SHORT but COMPLETE script when you have difficulties. Why do
> you continue to refuse to do that? Why do you continue to expect free
> help without following even the most simple of requests?
>
> Additionally, please read the documentation for the module you are
> using. In this case, perldoc Test::Harness shows:
> ==============================
> STOP! If all you want to do is write a test script, consider using
> Test::Simple. Test::Harness is the module that reads the output from
> Test::Simple, Test::More and other modules based on Test::Builder. You
> don't need to know about Test::Harness to use those modules.
>
> Test::Harness runs tests and expects output from the test in a certain
> format. That format is called TAP, the Test Anything Protocol. It is
> defined in Test::Harness::TAP.
> ==============================
>
> So, are you sure you know what you're doing? Doesn't really sound like
> your tests *should* be outputting anything other than TAP formatted
> messages.
>
> If you were to keep reading, you would find:
> ==============================
> $Test::Harness::Verbose
> The package variable $Test::Harness::Verbose is exportable and can be
> used to let runtests() display the standard output of the script
> without altering the behavior otherwise. The prove utility's -v flag
> will set this.
> ===============================
>


Thanks for you help. I didn't post code, because this didn't seem to be
a code issue. I'll do that next time.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Using Python Scripts with IIS - ASP or Python-based CGI scripts withIIS - which makes more sense? davidj411 Python 0 06-27-2008 04:38 PM
What is required for perl scripts to run correct when launched from rc scripts on HPUX 11? deanjones7@gmail.com Perl Misc 13 09-10-2007 11:58 AM
Stupid question: Making scripts python-scripts Jan Danielsson Python 8 07-22-2005 12:20 AM
Re: Stupid question: Making scripts python-scripts Jp Calderone Python 0 07-21-2005 02:38 PM



Advertisments