From: Rafael Garcia-Suarez Date: Sat, 1 Sep 2001 14:50:14 +0000 (+0200) Subject: , was t/op/incode.t breaks make minitest X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=22e2837f3c603836f14e7ecdf873d47a2e95cda5;p=p5sagit%2Fp5-mst-13.2.git , was t/op/incode.t breaks make minitest Message-ID: <20010901145014.A691@rafael> p4raw-id: //depot/perl@11810 --- diff --git a/t/op/inccode.t b/t/op/inccode.t index 9173156..95ee7c0 100644 --- a/t/op/inccode.t +++ b/t/op/inccode.t @@ -8,18 +8,23 @@ BEGIN { } use File::Spec; -use File::Temp qw/tempfile/; use Test::More tests => 30; +my @tempfiles = (); + sub get_temp_fh { - my ($fh,$f) = tempfile("DummyModuleXXXX", DIR => File::Spec->curdir, - UNLINK => 1); + my $f = "DummyModule0000"; + 1 while -e ++$f; + push @tempfiles, $f; + open my $fh, ">$f" or die "Can't create $f: $!"; print $fh "package ".substr($_[0],0,-3)."; 1;"; close $fh; open $fh, $f or die "Can't open $f: $!"; return $fh; } +END { 1 while unlink @tempfiles } + sub get_addr { my $str = shift; $str =~ /(0x[0-9a-f]+)/i;