diff options
author | Shlomi Fish <shlomif@iglu.org.il> | 2011-06-15 21:46:16 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-06-15 21:53:19 -0700 |
commit | 076b743fc5f369c78306040642d57f05f84f6dba (patch) | |
tree | 834fa4eecaff325cbb95e1a6197b999bb0a22783 /lib/perl5db.t | |
parent | 2211a10b908f0f844bed2deea3745c72b54d2f2f (diff) | |
download | perl-076b743fc5f369c78306040642d57f05f84f6dba.tar.gz |
Break upon <filename>:<line>
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r-- | lib/perl5db.t | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t index f4f32dacae..2cc1ead41f 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -27,7 +27,7 @@ my $dev_tty = '/dev/tty'; } } -plan(10); +plan(11); sub rc { open RC, ">", ".perldb" or die $!; @@ -159,6 +159,36 @@ SKIP: { is($output, "", "proxy constant subroutines"); } +# Testing that we can set a line in the middle of the file. +{ + rc(<<'EOF'); +&parse_options("NonStop=0 TTY=db.out LineInfo=db.out"); + +sub afterinit { + push (@DB::typeahead, + 'b ../lib/perl5db/t/MyModule.pm:12', + 'c', + q/do { use IO::Handle; STDOUT->autoflush(1); print "Var=$var\n"; }/, + 'c', + 'q', + ); + +} +EOF + + my $output = runperl(switches => [ '-d', '-I', '../lib/perl5db/t', ], stderr => 1, progfile => '../lib/perl5db/t/filename-line-breakpoint'); + + like($output, qr/ + ^Var=Bar$ + .* + ^In\ MyModule\.$ + .* + ^In\ Main\ File\.$ + .* + /msx, + "Can set breakpoint in a line in the middle of the file."); +} + # [perl #66110] Call a subroutine inside a regex { |