File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -3602,6 +3602,38 @@ EOS
3602
3602
" didn't run the wrong code" );
3603
3603
}
3604
3604
3605
+ {
3606
+ my $wrapper = DebugWrap-> new(
3607
+ {
3608
+ cmds =>
3609
+ [
3610
+ " b compile problem" ,
3611
+ " L" ,
3612
+ " c" ,
3613
+ " q"
3614
+ ],
3615
+ prog => \<<'EOS'
3616
+ print "1\n";
3617
+ eval <<'EOC';
3618
+ sub problem {
3619
+ $SIG{__DIE__} = sub {
3620
+ die "<b problem> will set a break point here.\n";
3621
+ }; # The break point _should_ be set here.
3622
+ warn "This line will run even if you enter <c problem>.\n";
3623
+ }
3624
+ EOC
3625
+ print "2\n";
3626
+ problem();
3627
+ print "3\n";
3628
+ EOS
3629
+ }
3630
+ );
3631
+ $wrapper -> contents_like(qr / Postponed\ breakpoints\ in\ subroutines:
3632
+ \s +main::problem\s +compile/ x ,
3633
+ " check compiled breakpoint present" );
3634
+ $wrapper -> contents_like(qr / print "2\\ n"/ , " break immediately after defining problem" );
3635
+ }
3636
+
3605
3637
done_testing();
3606
3638
3607
3639
END {
You can’t perform that action at this time.
0 commit comments