diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2007-08-17 00:06:40 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2007-08-17 00:06:40 -0500 |
commit | eb7b05d914faa8d81a064c54bc910e4ff8616b83 (patch) | |
tree | 1721b846b539fad51890665d3e614547dcd094a5 /t/010-read-write.t | |
parent | ffef15f0c4c80de0101c1d05b921011a37a080b8 (diff) | |
download | io-pty-easy-eb7b05d914faa8d81a064c54bc910e4ff8616b83.tar.gz io-pty-easy-eb7b05d914faa8d81a064c54bc910e4ff8616b83.zip |
we have tests
Diffstat (limited to 't/010-read-write.t')
-rw-r--r-- | t/010-read-write.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/010-read-write.t b/t/010-read-write.t new file mode 100644 index 0000000..d538fe8 --- /dev/null +++ b/t/010-read-write.t @@ -0,0 +1,15 @@ +#!perl +use strict; +use warnings; +use Test::More tests => 1; +use IO::Pty::Easy; + +my $pty = new IO::Pty::Easy; + +$pty->spawn("$^X -ple ''"); +$pty->write("testing\n"); +like($pty->read, qr/testing/, "basic read/write testing"); +# if the perl script ends with a subprocess still running, the test will exit +# with the exit status of the signal that the subprocess dies with, so we have to wait for the subprocess to finish before exiting. +$pty->kill; +1 while $pty->is_active; |