From 9eb48717912f4fd262be607b74cc3c89014fc58b Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 6 Nov 2012 10:02:21 -0800 Subject: [PATCH] svleak.t: Fix a mad failure --- t/op/svleak.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/op/svleak.t b/t/op/svleak.t index 96bf092..129bd0a 100644 --- a/t/op/svleak.t +++ b/t/op/svleak.t @@ -33,7 +33,8 @@ sub leak { } # Like leak, but run a string eval instead; takes into account existing -# string eval leaks under -Dmad. The code is used instead of the test name +# string eval leaks under -Dmad (except when -Dmad leaks two or +# more SVs). The code is used instead of the test name # if the name is absent. sub eleak { my ($n,$delta,$code,@rest) = @_; @@ -199,7 +200,8 @@ eleak(2, 0, 'no warnings; nonexistent_function 33838', 'bareword followed by number'); eleak(2, 0, '//dd;'x20, '"too many errors" when parsing m// flags'); eleak(2, 0, 's///dd;'x20, '"too many errors" when parsing s/// flags'); -eleak(2, 0, 'no warnings; 2 2;BEGIN{}', 'BEGIN block after syntax error'); +eleak(2, !!$Config{mad}, 'no warnings; 2 2;BEGIN{}', + 'BEGIN block after syntax error'); { local %INC; # in case Errno is already loaded eleak(2, 0, 'no warnings; 2@!{', -- 2.7.4