summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r--lib/perl5db.t28
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.