summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-02-03 20:04:18 -0500
committerdoy <doy@tozt.net>2009-02-03 20:04:18 -0500
commit3ac8638b4c875d2db479afc28dc336a80ed546fa (patch)
tree511ee4da67945702706172a323174b884c6194f2
parentf3f64ba34c7c00b82c21d0a61f4b854750f59c98 (diff)
downloadio-pty-easy-3ac8638b4c875d2db479afc28dc336a80ed546fa.tar.gz
io-pty-easy-3ac8638b4c875d2db479afc28dc336a80ed546fa.zip
close the child ptys after tests that spawn things in them
-rw-r--r--t/003-subprocess.t2
-rw-r--r--t/010-read-write.t2
-rw-r--r--t/100-system.t1
3 files changed, 3 insertions, 2 deletions
diff --git a/t/003-subprocess.t b/t/003-subprocess.t
index c5d17bd..352b7b4 100644
--- a/t/003-subprocess.t
+++ b/t/003-subprocess.t
@@ -18,4 +18,4 @@ unlike($outside_of_pty, qr/ok/, "running outside of pty fails -t checks");
$script .= "sleep 1 while 1;";
$pty->spawn("$^X -e '$script'");
like($pty->read, qr/ok/, "runs subprocess in a pty");
-$pty->kill;
+$pty->close;
diff --git a/t/010-read-write.t b/t/010-read-write.t
index a7ad8c7..8e401ad 100644
--- a/t/010-read-write.t
+++ b/t/010-read-write.t
@@ -12,4 +12,4 @@ 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 kill the subprocess before exiting.
-$pty->kill;
+$pty->close;
diff --git a/t/100-system.t b/t/100-system.t
index 5c64156..bfc423a 100644
--- a/t/100-system.t
+++ b/t/100-system.t
@@ -28,3 +28,4 @@ eval {
};
isnt($@, "alarm2\n", "system() didn't time out (after kill)");
is($output, "bar", "system() got the right value (after kill)");
+$pty->close;