Convert the 61222 test to DebugWrap.
authorShlomi Fish <shlomif@shlomifish.org>
Wed, 12 Sep 2012 14:13:32 +0000 (17:13 +0300)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:22 +0000 (09:18 -0500)
lib/perl5db.t

index bf2d539..1b21f0f 100644 (file)
@@ -65,27 +65,6 @@ sub _out_contents
     return _slurp($out_fn);
 }
 
-# Test [perl #61222]
-{
-    local $ENV{PERLDB_OPTS};
-    rc(
-        <<'EOF',
-        &parse_options("NonStop=0 TTY=db.out LineInfo=db.out");
-
-        sub afterinit {
-            push(@DB::typeahead,
-                'm Pie',
-                'q',
-            );
-        }
-EOF
-    );
-
-    my $output = runperl(switches => [ '-d' ], stderr => 1, progfile => '../lib/perl5db/t/rt-61222');
-    unlike(_out_contents(), qr/INCORRECT/, "[perl #61222]");
-}
-
-
 
 # Test for Proxy constants
 {
@@ -492,6 +471,24 @@ SKIP:
     }
 }
 
+# Test [perl #61222]
+{
+    local $ENV{PERLDB_OPTS};
+    my $wrapper = DebugWrap->new(
+        {
+            cmds =>
+            [
+                'm Pie',
+                'q',
+            ],
+            prog => '../lib/perl5db/t/rt-61222',
+        }
+    );
+
+    $wrapper->contents_unlike(qr/INCORRECT/, "[perl #61222]");
+}
+
+
 # Testing that we can set a line in the middle of the file.
 {
     my $wrapper = DebugWrap->new(