summaryrefslogtreecommitdiffstats
path: root/t/004-undefined-program.t
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2007-08-17 00:06:40 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2007-08-17 00:06:40 -0500
commiteb7b05d914faa8d81a064c54bc910e4ff8616b83 (patch)
tree1721b846b539fad51890665d3e614547dcd094a5 /t/004-undefined-program.t
parentffef15f0c4c80de0101c1d05b921011a37a080b8 (diff)
downloadio-pty-easy-eb7b05d914faa8d81a064c54bc910e4ff8616b83.tar.gz
io-pty-easy-eb7b05d914faa8d81a064c54bc910e4ff8616b83.zip
we have tests
Diffstat (limited to 't/004-undefined-program.t')
-rw-r--r--t/004-undefined-program.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/004-undefined-program.t b/t/004-undefined-program.t
new file mode 100644
index 0000000..6a50f3b
--- /dev/null
+++ b/t/004-undefined-program.t
@@ -0,0 +1,13 @@
+#!perl
+use strict;
+use warnings;
+use Test::More tests => 2;
+use IO::Pty::Easy;
+
+my $pty = new IO::Pty::Easy;
+eval { $pty->spawn("missing_program_io_pty_easy") };
+like($@, qr/Cannot exec\(missing_program_io_pty_easy\)/);
+TODO: {
+local $TODO = "spawn() needs to block on is_active until SIGCHLD is received if it fails";
+ok(!$pty->is_active, "pty isn't active if program doesn't exist");
+}