summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-09-12 13:35:43 +0300
committerRicardo Signes <rjbs@cpan.org>2012-11-12 09:18:20 -0500
commitada05bfe590ac0e480f8b1e225797b915b3f8aa5 (patch)
treeed9775c0a143d4e9bbf24dc758983673c43a30a2 /lib/perl5db.t
parent1896f514a70231126a7e4b931b270bc34f918795 (diff)
downloadperl-ada05bfe590ac0e480f8b1e225797b915b3f8aa5.tar.gz
Add a test for l -num.
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r--lib/perl5db.t31
1 files changed, 30 insertions, 1 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t
index aa046cb9d5..c55966685b 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -28,7 +28,7 @@ BEGIN {
}
}
-plan(78);
+plan(79);
my $rc_filename = '.perldb';
@@ -1758,6 +1758,35 @@ package main;
);
}
+# Test the ! -number command.
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'l 3-5',
+ 'l 2',
+ '! -1',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/disable-breakpoints-1',
+ }
+ );
+
+ $wrapper->contents_like(qr#
+ (^3:\s+my\ \$dummy\ =\ 0;\n
+ 4\s*\n
+ 5:\s+\$x\ =\ "FirstVal";)\n
+ .*?
+ ^2==\>\s+my\ \$x\ =\ "One";\n
+ .*?
+ ^l\ 3-5\n
+ \1
+ #msx,
+ 'Test the ! -n command (along with l)',
+ );
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}