diff options
author | Shlomi Fish <shlomif@iglu.org.il> | 2011-06-15 21:38:06 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-06-15 21:53:19 -0700 |
commit | 2211a10b908f0f844bed2deea3745c72b54d2f2f (patch) | |
tree | f1a322ae7f3c96a0dd621d0b5359fe92f7ebee82 /lib/perl5db.t | |
parent | f34d15629da26eee6e2b4b28c96865dc4921c52b (diff) | |
download | perl-2211a10b908f0f844bed2deea3745c72b54d2f2f.tar.gz |
Tests for #92906: perl -d has non-functional b command
In bleadperl (NOT perl-5.12.3) perl -d's "b" command does not appear
to do anything as verified on my x86-64 Mandriva Linux Cooker machine. This
patch adds a regression test to test for it.
See:
http://www.nntp.perl.org/group/perl.perl5.porters/2011/06/msg173568.html
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r-- | lib/perl5db.t | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t index 441913676e..f4f32dacae 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -27,7 +27,7 @@ my $dev_tty = '/dev/tty'; } } -plan(9); +plan(10); sub rc { open RC, ">", ".perldb" or die $!; @@ -177,6 +177,32 @@ SKIP: { is($output, '[$^X][done]', "taint"); } +# Testing that we can set a breakpoint +{ + rc(<<'EOF'); +&parse_options("NonStop=0 TTY=db.out LineInfo=db.out"); + +sub afterinit { + push (@DB::typeahead, + 'b 6', + 'c', + q/do { use IO::Handle; STDOUT->autoflush(1); print "X={$x}\n"; }/, + 'c', + 'q', + ); + +} +EOF + + my $output = runperl(switches => [ '-d', ], stderr => 1, progfile => '../lib/perl5db/t/breakpoint-bug'); + + like($output, qr/ + X=\{Two\} + /msx, + "Can set breakpoint in a line."); +} + + # clean up. |