Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How do you test code that uses Term::UI?

by Athanasius (Monsignor)
on Sep 02, 2012 at 08:18 UTC ( #991246=note: print w/ replies, xml ) Need Help??


in reply to [Updated] How do you test code that uses Term::UI?

Have you seen the 2008 thread Alternative to Expect for Activestate Perl on Windows ? The consensus there seems to be to use one of these approaches:

  1. Use the CPAN module IO::React, which does work under Windows.
  2. Execute the tests in TCL using ActiveState’s Expect for Windows.

I have no experience with either of these, but I hope they help.

Athanasius <°(((><contra mundum


Comment on Re: How do you test code that uses Term::UI?
Re^2: How do you test code that uses Term::UI?
by Anonymous Monk on Sep 02, 2012 at 09:25 UTC
Re^2: How do you test code that uses Term::UI?
by dly (Beadle) on Sep 02, 2012 at 10:07 UTC

    No, I didn't see that thread. It didn't occur to me to search for stuff regarding Expect.

    IO::React looks really cool. I glanced at the code, and it's only a few hundred lines long, which is crazy, because it's an Expect replacement, and it's tiny compared to it. The only potential problem of using it is that it hasn't been updated in 11 years! But its tests still pass, but then you look at its tests, and its just one file called basic.t that only has like 18 tests in it, and basic.t manually prints 1..18 and ok and not ok implementing its TAP all on its own! That might not have been that crazy back in 2001.

    Using TCL would be a really crazy dependency, but could work.

    I think I'm leaning towards IO::React or Mocking it using default values and AutoReply = 1 like Term::UI does.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991246]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-12-20 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls