summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-11-15 17:54:26 +0200
committerTony Cook <tony@develop-help.com>2013-01-02 11:22:04 +1100
commit50acbf3bbd1afcaf915d749b17bd75e286248794 (patch)
tree2a676f90d2a341f28f72f7d6d3247978f51fbfab /lib/perl5db.t
parent55ade8eaa80d6afdd82ae1bdcd7d36b4a378d244 (diff)
downloadperl-50acbf3bbd1afcaf915d749b17bd75e286248794.tar.gz
Add a testcase for the bug.
It is caused by $obj spontaneously becoming undef for no good reason - seems like a bug in the perl interpreter (or elsewhere). This was noticed by Father C here: https://rt.perl.org/rt3/Ticket/Display.html?id=114926
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r--lib/perl5db.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t
index b021ffe78c..e2efa25fc6 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -798,6 +798,30 @@ sub _calc_trace_wrapper
);
}
+# Tests for x with AutoTrace=1.
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'n',
+ 'o AutoTrace=1',
+ # So it may fail.
+ q/x "failure"/,
+ q/x \$x/,
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/with-subroutine',
+ }
+ );
+
+ $wrapper->contents_like(
+ # qr/^0\s+HASH\([^\)]+\)\n\s+500 => 600\n/,
+ qr/^0\sSCALAR\([^\)]+\)\n\s+-> 'hello world'\n/ms,
+ "x after AutoTrace=1 command is working."
+ );
+}
+
# Tests for "T" (stack trace).
{
my $prog_fn = '../lib/perl5db/t/rt-104168';