diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-06-06 13:40:40 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-06 21:58:43 +0200 |
commit | a1157350ae411d923510ca14680a1b297263bf26 (patch) | |
tree | 2ebdacdf0a3122bc0631392759777100826e7fd6 /ext/IPC-Open3 | |
parent | 479ddbbe3c0c772d5afd4d07c81503d8bf4b2582 (diff) | |
download | perl-a1157350ae411d923510ca14680a1b297263bf26.tar.gz |
Test that IPC::Open{2,3} correctly fault read-only file-handle parameters.
Diffstat (limited to 'ext/IPC-Open3')
-rw-r--r-- | ext/IPC-Open3/t/IPC-Open3.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/IPC-Open3/t/IPC-Open3.t b/ext/IPC-Open3/t/IPC-Open3.t index 8ff410093f..09c44d78b2 100644 --- a/ext/IPC-Open3/t/IPC-Open3.t +++ b/ext/IPC-Open3/t/IPC-Open3.t @@ -14,7 +14,7 @@ BEGIN { } use strict; -use Test::More tests => 24; +use Test::More tests => 25; use IO::Handle; use IPC::Open3; @@ -157,3 +157,7 @@ if (IPC::Open3::DO_SPAWN) { } else { isnt($@, '') or do {waitpid $pid, 0}; } + +$pid = eval { open3 'WRITE', '', 'ERROR', '/non/existent/program'; }; +like($@, qr/^open3: Modification of a read-only value attempted at /, + 'open3 faults read-only parameters correctly') or do {waitpid $pid, 0}; |