From 742c59c5d43f52521736f080c4236de77709616c Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Fri, 21 Sep 2012 11:31:29 +0300 Subject: [PATCH] [perl5db] Add a test for the 't' command. Apparently, the 'o AutoTrace' command is broken since perl-5.16.x and I want to get a good output for 't' first before fixing it. --- lib/perl5db.t | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/perl5db.t b/lib/perl5db.t index 8d73d11..79814ed 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -28,7 +28,7 @@ BEGIN { } } -plan(92); +plan(93); my $rc_filename = '.perldb'; @@ -2200,6 +2200,30 @@ sub _calc_trace_wrapper ); } +# Test the t command +{ + my $wrapper = DebugWrap->new( + { + cmds => + [ + 't', + 'c', + 'q', + ], + prog => '../lib/perl5db/t/disable-breakpoints-1', + } + ); + + $wrapper->contents_like(qr/ + ^main::\([^:]+:15\):\n + 15:\s+\$dummy\+\+;\n + main::\([^:]+:17\):\n + 17:\s+\$x\ =\ "FourthVal";\n + /msx, + 'Test the t command (without a number.)', + ); +} + END { 1 while unlink ($rc_filename, $out_fn); } -- 2.7.4