summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-09-20 17:28:39 +0300
committerRicardo Signes <rjbs@cpan.org>2012-11-12 09:18:24 -0500
commitca3d93988b101a7212b5cae53d15cbf5d85be6a7 (patch)
tree3312a74f0200d7a6381d6977468f3be580475100 /lib/perl5db.t
parentb705c7744a0d4605084116e6be5081cdbe60b62c (diff)
downloadperl-ca3d93988b101a7212b5cae53d15cbf5d85be6a7.tar.gz
[perl5db] Add a test for warnLevel=1.
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r--lib/perl5db.t27
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t
index 26cdeafe79..8d73d11236 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -28,7 +28,7 @@ BEGIN {
}
}
-plan(91);
+plan(92);
my $rc_filename = '.perldb';
@@ -2175,6 +2175,31 @@ sub _calc_trace_wrapper
);
}
+# Test the warnLevel option
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ q/o warnLevel='1'/,
+ q/c/,
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/test-warnLevel-option-1',
+ }
+ );
+
+ $wrapper->contents_like(qr#
+ ^This\ is\ not\ a\ warning\.\ at\ \S+\ line\ 18\.\n
+ .*?
+ ^\s+main::baz\(\)\ called\ at\ \S+\ line\ 13\n
+ \s+main::bar\(\)\ called\ at\ \S+\ line\ 25\n
+ \s+main::myfunc\(\)\ called\ at\ \S+\ line\ 28\n
+ #msx,
+ 'Test the o warnLevel option',
+ );
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}