in reply to Re^3: Writing unit test scripts for .pl scripts
in thread Writing unit test scripts for .pl scripts

...come back with any questions...
I have one. :-)

How do you test scripts (i.e. not a module)? The OP may not be able or want to change the scripts. The scripts may or may not be interactive, they may or may not need arguments supplied etc.

Any tips on where to start looking? Is there something like Test::Expect for non-interactive scripts?

update: tried to straighten out the grammer

  • Comment on Re^4: Writing unit test scripts for .pl scripts

Replies are listed 'Best First'.
Re^5: Writing unit test scripts for .pl scripts
by talexb (Chancellor) on May 04, 2008 at 14:47 UTC
      How do you test scripts (i.e. not a module)? The OP may not be able or want to change the scripts. The scripts may or may not be interactive, they may or may not need arguments supplied etc.

    Those are great questions, and I'm hoping the OP can tell us more about their situation.

    So far, the only thing I know about these scripts is that they access a database and that the code is a little crufty. Apart from that, I know nothing.

    I don't know if these scripts are web-based or if they're command-line based. I don't know if the scripts are batch or interactive. I don't know what platform is involved, and I don't know what the database is.

    Therefore, I've tried to make my answers as useful as possible, while also being as generic as possible.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds