}
use strict;
-use IPC::Open3 qw(open3);
-use IO::Select;
-$|=1;
+$| = 1;
my @prgs;
require "dumpvar.pl";
+END { 1 while unlink "de0.out" }
+
$ENV{PERLDB_OPTS} = "TTY=0";
-my($ornament1,$ornament2,$wtrfh,$rdrfh);
+my ($ornament1, $ornament2);
my $Perl = which_perl();
-open3 $wtrfh, $rdrfh, 0, $Perl, "-de0" or die;
-my $ios = IO::Select->new();
-$ios->add($rdrfh);
for (@prgs){
- my($prog,$expected) = split(/\nEXPECT\n?/, $_);
- print $wtrfh $prog, "\n";
- my $got;
- for my $try (1..3) {
- if ($ios->can_read(0.25)) {
- sysread $rdrfh, $got, 1024, length($got);
- select undef, undef, undef, 0.25;
- }
- }
+ my($prog, $expected) = split(/\nEXPECT\n?/, $_);
+ open my $debug, qq{| $Perl "-de0" 2>de0.out} or die;
+ print $debug $prog, "\n";
+ close $debug;
+ my $got = do { local $/; open my $fh, "de0.out" or die; <$fh> };
SKIP: {
skip("failed to read debugger", 1) unless defined $got && length $got;
$got =~ s/^\s*Loading.*\r?\n?Editor.*\r?\n?\r?\n?Enter.*\r?\n?\r?\n?main::\(-e:1\):\s+0\r?\n?//;