|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Expect.pm and multiline commandsby cbrandtbuffalo (Deacon) |
| on Sep 28, 2006 at 09:28 UTC ( [id://575348]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.cbrandtbuffalo has asked for the wisdom of the Perl Monks concerning the following question:
In a typical unix shell, you can type a multiline command using \, that is:
I'm trying to build a test using Test::Expect, but I'm finding it hard to duplicate the above. I tried a few variations and seems to send the right stuff, escaping and sending a '\', then a newline. But I think Expect.pm is getting confused because it seems to treat the second part of the command as the expected output. Is there a standard way to do this? Who's getting confused, Test::Expect, Expect::Simple, or Expect.pm? Update:One other question: even if I get this working, will this test only work in some shells? That is, if I wanted it to be multi-platform, would I need multiple versions of the test? Update:Modified example to show that the newline is inside a quoted string. Thanks for any suggestions.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||