summaryrefslogtreecommitdiff
path: root/ext/Devel-Peek/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-22 12:52:15 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-22 12:54:33 -0700
commit486ffce2e3218c92f8211b19f0be2fc5532f8b57 (patch)
tree7ab429caa90ebb59e6a518aa335ae0793c543289 /ext/Devel-Peek/t
parentc9795579db61c900bacee2790bdceb7bad3dd45d (diff)
downloadperl-486ffce2e3218c92f8211b19f0be2fc5532f8b57.tar.gz
Peek.t: Test that DeadCode doesn’t crash
I broke it, but Karl Williamson’s commit (the previous) with my tweaks fixes it. This function was not at all exercised by the test suite.
Diffstat (limited to 'ext/Devel-Peek/t')
-rw-r--r--ext/Devel-Peek/t/Peek.t8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index f6419822de..5a8efe3cd7 100644
--- a/ext/Devel-Peek/t/Peek.t
+++ b/ext/Devel-Peek/t/Peek.t
@@ -922,4 +922,12 @@ unless ($Config{useithreads}) {
# (One block of study tests removed when study was made a no-op.)
+{
+ open(OUT,">peek$$") or die "Failed to open peek $$: $!";
+ open(STDERR, ">&OUT") or die "Can't dup OUT: $!";
+ DeadCode();
+ open(STDERR, ">&SAVERR") or die "Can't restore STDERR: $!";
+ pass "no crash with DeadCode";
+}
+
done_testing();