From 486ffce2e3218c92f8211b19f0be2fc5532f8b57 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Wed, 22 Aug 2012 12:52:15 -0700 Subject: [PATCH] =?utf8?q?Peek.t:=20Test=20that=20DeadCode=20doesn?= =?utf8?q?=E2=80=99t=20crash?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- ext/Devel-Peek/t/Peek.t | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index f641982..5a8efe3 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(); -- 2.7.4