t/op/substr.t See if substr works
t/op/substr_thr.t See if substr works in another thread
t/op/sub.t See if subroutines work
+t/op/svleak.pl Test file for svleak.t
t/op/svleak.t See if stuff leaks SVs
t/op/switch.t See if switches (given/when) work
t/op/symbolcache.t See if undef/delete works on stashes with functions
use Config;
-plan tests => 22;
+plan tests => 25;
# run some code N times. If the number of SVs at the end of loop N is
# greater than (N-1)*delta at the end of loop 1, we've got a leak
leak(2, 0, sub { eval q{ my $x = "x"; "abc" =~ /$x/ for 1..5 } }, '#114356');
}
+SKIP: {
+ skip "disabled under -Dmad (eval leaks)" if $Config{mad};
+ leak(2, 0, sub { eval '"${<<END}"
+ ' }, 'unterminated here-doc in quotes in multiline eval');
+ leak(2, 0, sub { eval '"${<<END
+ }"' }, 'unterminated here-doc in multiline quotes in eval');
+ leak(2, 0, sub { eval { do './op/svleak.pl' } },
+ 'unterminated here-doc in file');
+}
++PL_parser->herelines;
}
if (s >= bufend) {
+ SvREFCNT_dec(herewas);
+ SvREFCNT_dec(tmpstr);
CopLINE_set(PL_curcop, (line_t)PL_multi_start);
missingterm(PL_tokenbuf + 1);
}
++PL_parser->herelines;
}
if (s >= PL_bufend) {
+ SvREFCNT_dec(herewas);
+ SvREFCNT_dec(tmpstr);
CopLINE_set(PL_curcop, (line_t)PL_multi_start);
missingterm(PL_tokenbuf + 1);
}
CopLINE_set(PL_curcop, PL_multi_start + PL_parser->herelines + 1);
if (!lex_next_chunk(LEX_NO_TERM)
&& (!SvCUR(tmpstr) || SvEND(tmpstr)[-1] != '\n')) {
+ SvREFCNT_dec(herewas);
+ SvREFCNT_dec(tmpstr);
CopLINE_set(PL_curcop, (line_t)PL_multi_start);
missingterm(PL_tokenbuf + 1);
}