summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-09-18 17:24:14 +0300
committerRicardo Signes <rjbs@cpan.org>2012-11-12 09:18:23 -0500
commit8b842515d9c6944f4ebda2e213d04f07b503bdd6 (patch)
treeef81db078669630021d8763269b0c35233b261d9 /lib/perl5db.t
parent2bceee64ee91178a2f5b5d15f7b36bff19ff06fa (diff)
downloadperl-8b842515d9c6944f4ebda2e213d04f07b503bdd6.tar.gz
[perl5db] Test the recallCommand option.
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 c3a072ca2b..87256b39b8 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -28,7 +28,7 @@ BEGIN {
}
}
-plan(89);
+plan(90);
my $rc_filename = '.perldb';
@@ -2120,6 +2120,35 @@ sub _calc_trace_wrapper
}
+# Test the recallCommand option.
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'o recallCommand=%',
+ '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 o recallCommand option',
+ );
+}
END {
1 while unlink ($rc_filename, $out_fn);
}