diff options
Diffstat (limited to 't/004-undefined-program.t')
-rw-r--r-- | t/004-undefined-program.t | 13 |
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"); +} |