From 708dd780e3f616326ace3e976492811791549704 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 12 Sep 2012 15:59:12 +0300 Subject: [PATCH] Convert a perl5db.t test to DebugWrap. --- lib/perl5db.t | 56 +++++++++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/lib/perl5db.t b/lib/perl5db.t index c559666..b48b191 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -65,37 +65,6 @@ sub _out_contents return _slurp($out_fn); } -{ - my $target = '../lib/perl5db/t/eval-line-bug'; - - rc( - <<"EOF", - &parse_options("NonStop=0 TTY=db.out LineInfo=db.out"); - - sub afterinit { - push(\@DB::typeahead, - 'b 23', - 'n', - 'n', - 'n', - 'c', # line 23 - 'n', - "p \\\@{'main::_<$target'}", - 'q', - ); - } -EOF - ); - - { - local $ENV{PERLDB_OPTS} = "ReadLine=0"; - runperl(switches => [ '-d' ], progfile => $target); - } -} - -like(_out_contents(), qr/sub factorial/, - 'The ${main::_new( + { + cmds => + [ + 'b 23', + 'n', + 'n', + 'n', + 'c', # line 23 + 'n', + "p \@{'main::_<$target'}", + 'q', + ], + prog => $target, + } + ); + $wrapper->contents_like( + qr/sub factorial/, + 'The ${main::_new( -- 1.8.3.1