From: Jarkko Hietaniemi Date: Sun, 17 Feb 2002 19:51:01 +0000 (+0000) Subject: Small tweaks to get the test running (fix @INC and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f51e7ad5e98fec2428ec465e9ce55643d93c2291;p=p5sagit%2Fp5-mst-13.2.git Small tweaks to get the test running (fix @INC and do not overwrite the table.utf8 and table.rnd). p4raw-id: //depot/perl@14733 --- diff --git a/ext/Encode/t/JP.t b/ext/Encode/t/JP.t index e9799da..fef229b 100644 --- a/ext/Encode/t/JP.t +++ b/ext/Encode/t/JP.t @@ -1,6 +1,6 @@ BEGIN { -# chdir 't' if -d 't'; -# @INC = (-d '../../lib' ? '../lib'; + chdir 't' if -d 't'; + @INC = '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bEncode\b/) { print "1..0 # Skip: Encode was not built\n"; @@ -23,9 +23,9 @@ ok($enc->isa('Encode::XS')); is($enc->name,'euc-jp'); my $dir = dirname(__FILE__); my $euc = File::Spec->catfile($dir,"table.euc"); -my $utf = File::Spec->catfile($dir,"table.utf8"); +my $utf = File::Spec->catfile($dir,"$$.utf8"); my $ref = File::Spec->catfile($dir,"table.ref"); -my $rnd = File::Spec->catfile($dir,"table.rnd"); +my $rnd = File::Spec->catfile($dir,"$$.rnd"); print "# Basic decode test\n"; open($src,"<",$euc) || die "Cannot open $euc:$!"; ok(defined($src) && fileno($src)); @@ -92,6 +92,5 @@ SKIP: is($enc->name,'euc-jp'); END { -# unlink($utf,$rnd); - + 1 while unlink($utf,$rnd); }