diff options
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r-- | lib/perl5db.t | 24 |
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'; |