summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-09-21 11:54:39 +0300
committerRicardo Signes <rjbs@cpan.org>2012-11-12 09:18:24 -0500
commitf910787d6f86aa5258b669c23e5375baf857cdc7 (patch)
treefad51481fd378e46694b7136a1705fa43e4137d9 /lib/perl5db.t
parent3d02bfa8cdadf357545e5d3cc25a744986c978b0 (diff)
downloadperl-f910787d6f86aa5258b669c23e5375baf857cdc7.tar.gz
[perl5db] Add a test for t command with sub calls.
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r--lib/perl5db.t29
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t
index 1d6a34251e..631635ea70 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -28,7 +28,7 @@ BEGIN {
}
}
-plan(94);
+plan(95);
my $rc_filename = '.perldb';
@@ -2248,6 +2248,33 @@ sub _calc_trace_wrapper
);
}
+# Test the t command with function calls
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 't',
+ 'b 18',
+ 'c',
+ 'x ["foo"]',
+ 'x ["bar"]',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/test-warnLevel-option-1',
+ }
+ );
+
+ $wrapper->contents_like(qr/
+ ^main::\([^:]+:28\):\n
+ 28:\s+myfunc\(\);\n
+ main::myfunc\([^:]+:25\):\n
+ 25:\s+bar\(\);\n
+ /msx,
+ 'Test the t command with function calls.',
+ );
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}