From: Jarkko Hietaniemi Date: Tue, 9 Sep 2003 07:04:53 +0000 (+0000) Subject: I claim that the debugger is untestable until proven otherwise. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1217c789ed43a7a9230a10761b3e038626e60d4a;p=p5sagit%2Fp5-mst-13.2.git I claim that the debugger is untestable until proven otherwise. p4raw-id: //depot/perl@21126 --- diff --git a/MANIFEST b/MANIFEST index e7d8876..51648b6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1468,7 +1468,6 @@ lib/open.t See if the open pragma works lib/overload.pm Module for overloading perl operators lib/overload.t See if operator overloading works lib/perl5db.pl Perl debugging routines -lib/perl5db/de0.t Testing debugger commands lib/PerlIO.pm PerlIO support module lib/PerlIO/via/QuotedPrint.pm PerlIO::via::QuotedPrint lib/PerlIO/via/t/QuotedPrint.t PerlIO::via::QuotedPrint diff --git a/lib/perl5db/de0.t b/lib/perl5db/de0.t deleted file mode 100644 index d468a92..0000000 --- a/lib/perl5db/de0.t +++ /dev/null @@ -1,84 +0,0 @@ -#!./perl -- -*- mode: cperl; cperl-indent-level: 4 -*- - -BEGIN { - chdir 't' if -d 't'; - @INC = qw(. ../lib); - require Config; import Config; - if ($^O eq 'VMS') { - print "1..0 # skip on $^O, no piped open\n"; - exit 0; - } - $ENV{PERL5LIB} = '../lib'; # so children will see it too - require 'test.pl'; -} - -use strict; - -$| = 1; - -my @prgs; - -{ - local $/; - @prgs = split "########\n", ; - close DATA; -} - -plan tests => scalar @prgs; - -require "dumpvar.pl"; - -END { 1 while unlink "de0.out" } - -$ENV{PERLDB_OPTS} = "TTY=0"; -my ($ornament1, $ornament2); -my $Perl = which_perl(); -for (@prgs){ - 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?//; - unless (defined $ornament1) { - $got =~ s/^\s*Loading.*\r?\n?Editor.*\r?\n?\r?\n?Enter.*\r?\n?\r?\n?main::\(-e:1\):\s+0\r?\n?//; - ($ornament1,$ornament2) = $got =~ - /(.*?)0\s+'reserved example for calibrating the ornaments'\r?\n?(.*)/ - } - $got =~ s/^\Q$ornament1\E//; - $got =~ s/\Q$ornament2\E\z//; - like($got, qr:$expected:i, $prog); - } -} - -__END__ -x "reserved example for calibrating the ornaments" -EXPECT -0 'reserved example for calibrating the ornaments' -######## -x "foo" -EXPECT -0 'foo' -######## -x "\x{100}" -EXPECT -0 '\\x\{0100\}' -######## -x *a -EXPECT -0 \*main::a -######## -x 1..3 -EXPECT -0 1 -1 2 -2 3 -######## -x +{1..4} -EXPECT -0\s+HASH\(0x[0-9a-f]+\) -\s+1 => 2 -\s+3 => 4 -########