summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-09-13 14:32:41 +0300
committerRicardo Signes <rjbs@cpan.org>2012-11-12 09:18:22 -0500
commit20e060ce58afa3f2b7f28b2054981970d915d103 (patch)
tree007f95cf17ac2f4d3bcccdd14098c382f8106567 /lib/perl5db.t
parent978684edb89d276d57fc89eb02653bc185507330 (diff)
downloadperl-20e060ce58afa3f2b7f28b2054981970d915d103.tar.gz
Convert to DebugWrap.
Diffstat (limited to 'lib/perl5db.t')
-rw-r--r--lib/perl5db.t30
1 files changed, 20 insertions, 10 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t
index 89a3f2838b..e538c61eb2 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -109,16 +109,6 @@ sub afterinit {
EOF
}
-# taint tests
-
-{
- local $ENV{PERLDB_OPTS} = "ReadLine=0 NonStop=1";
- my $output = runperl(switches => [ '-d', '-T' ], stderr => 1,
- progfile => '../lib/perl5db/t/taint');
- chomp $output if $^O eq 'VMS'; # newline guaranteed at EOF
- is($output, '[$^X][done]', "taint");
-}
-
package DebugWrap;
sub new {
@@ -306,6 +296,11 @@ sub _run {
return;
}
+sub get_output
+{
+ return shift->_output();
+}
+
sub output_like {
my ($self, $re, $msg) = @_;
@@ -510,6 +505,21 @@ sub _calc_foo_wrapper
$wrapper->contents_unlike(qr/baz/, "[perl #104168] - no 'baz'");
}
+# taint tests
+{
+ my $wrapper = _calc_foo_wrapper(
+ {
+ prog => '../lib/perl5db/t/taint',
+ extra_opts => ' NonStop=1',
+ switches => [ '-d', '-T', ],
+ }
+ );
+
+ my $output = $wrapper->get_output();
+ chomp $output if $^O eq 'VMS'; # newline guaranteed at EOF
+ is($output, '[$^X][done]', "taint");
+}
+
# Testing that we can set a line in the middle of the file.
{
my $wrapper = DebugWrap->new(