Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Dear Monks,

I need to test a perl script which offers CLI functionality for some module.

I have discovered Test::Script and its script_fails() which is great.

BUT, I have noticed that in its synopsis it uses Test2::V0 as its general testing framework, And internally it depends on Test2::API. Unfortunately, I started this module some time ago and used Test::More. And I would not be happy changing horses mid-stream, as they say.

My questions are:

  1. Is there an alternative to script_fails() but without a Test2 (or any other Test[0-9]+ except Test::More) dependency?
  2. Is Test2 compatible with Test::More (can I just replace use Test::More and get on with it?)
  3. Test::Script's synopsis starts with:

    use Test2::V0; use Test::Script;

    I guess I have to start my tests in the same way and declare a dependency on Test2::V0 as well?

many thanks,

bw, bliako


In reply to Testing scripts under Test::More (with Test::Script) by bliako

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2023-12-08 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (37 votes). Check out past polls.

    Notices?