my @algorithmic_names_count = (0) x $block_count;
# Read the DB, and fill in @names with the character names.
- open my $fh, "<", "../lib/unicore/UnicodeData.txt" or
- die "Can't open ../lib/unicore/UnicodeData.txt: $!";
+ open my $fh, "<", "../../lib/unicore/UnicodeData.txt" or
+ die "Can't open ../../lib/unicore/UnicodeData.txt: $!";
while (<$fh>) {
chomp;
my ($code, $name, undef, undef, undef, undef, undef, undef, undef, undef, $u1name) = split ";";
unicore/perl_alias.pl cannot be used as alias file for charnames at
########
# alias with bad file
---FILE-- ../lib/unicore/xyzzy_alias.pl
+--FILE-- ../../lib/unicore/xyzzy_alias.pl
#!perl
0;
--FILE--
unicore/xyzzy_alias.pl did not return a \(valid\) list of alias pairs at
########
# alias with file with empty list
---FILE-- ../lib/unicore/xyzzy_alias.pl
+--FILE-- ../../lib/unicore/xyzzy_alias.pl
#!perl
();
--FILE--
Unknown charname 'e_ACUTE' at
########
# alias with file OK but file has :short aliasses
---FILE-- ../lib/unicore/xyzzy_alias.pl
+--FILE-- ../../lib/unicore/xyzzy_alias.pl
#!perl
( e_ACUTE => "LATIN:e WITH ACUTE",
a_ACUTE => "LATIN:a WITH ACUTE",
Unknown charname 'LATIN:e WITH ACUTE' at
########
# alias with :short and file OK
---FILE-- ../lib/unicore/xyzzy_alias.pl
+--FILE-- ../../lib/unicore/xyzzy_alias.pl
#!perl
( e_ACUTE => "LATIN:e WITH ACUTE",
a_ACUTE => "LATIN:a WITH ACUTE",
$
########
# alias with :short and file OK has :long aliasses
---FILE-- ../lib/unicore/xyzzy_alias.pl
+--FILE-- ../../lib/unicore/xyzzy_alias.pl
#!perl
( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
Unknown charname 'LATIN SMALL LETTER E WITH ACUTE' at
########
# alias with file implicit :full but file has :short aliasses
---FILE-- ../lib/unicore/xyzzy_alias.pl
+--FILE-- ../../lib/unicore/xyzzy_alias.pl
#!perl
( e_ACUTE => "LATIN:e WITH ACUTE",
a_ACUTE => "LATIN:a WITH ACUTE",
Unknown charname 'LATIN:e WITH ACUTE' at
########
# alias with file implicit :full and file has :long aliasses
---FILE-- ../lib/unicore/xyzzy_alias.pl
+--FILE-- ../../lib/unicore/xyzzy_alias.pl
#!perl
( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
close F ;
}
+my $tempdir = tempfile;
+
+mkdir $tempdir, 0700 or die "Can't mkdir '$tempdir': $!";
+chdir $tempdir or die die "Can't chdir '$tempdir': $!";
+unshift @INC, '../../lib';
+my $cleanup = 1;
+my %tempfiles;
+
+END {
+ if ($cleanup) {
+ chdir '..' or die "Couldn't chdir .. for cleanup: $!";
+ rmtree($tempdir);
+ }
+}
+
local $/ = undef;
my $tests = $::local_tests || 0;
print TEST "\n#line 1\n"; # So the line numbers don't get messed up.
print TEST $prog,"\n";
close TEST or die "Cannot close $tmpfile: $!";
- my $results = runperl( switches => [$switch], stderr => 1, progfile => $tmpfile );
+ my $results = runperl( switches => ["-I../../lib", $switch], nolib => 1,
+ stderr => 1, progfile => $tmpfile );
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
}
use warnings 'io' ;
close STDOUT;
-open FH1, "harness"; close FH1;
+open FH1, "../harness"; close FH1;
no warnings 'io' ;
-open FH2, "harness"; close FH2;
+open FH2, "../harness"; close FH2;
EXPECT
Filehandle STDOUT reopened as FH1 only for input at - line 14.
########
########
# pp_sys.c [pp_lstat]
use warnings 'io';
-open FH, "harness" or die "# $!";
+open FH, "../harness" or die "# $!";
lstat FH;
open my $fh, $0 or die "# $!";
lstat $fh;
use warnings;
opendir FOO, ".";
opendir my $foo, ".";
-open FOO, "TEST";
-open $foo, "TEST";
+open FOO, "../harness";
+open $foo, "../harness";
no warnings qw(io deprecated);
-open FOO, "TEST";
-open $foo, "TEST";
+open FOO, "../harness";
+open $foo, "../harness";
EXPECT
Opening dirhandle FOO also as a file at - line 5.
Opening dirhandle $foo also as a file at - line 6.
########
# pp_sys.c [pp_open_dir]
use warnings;
-open FOO, "TEST";
-open my $foo, "TEST";
+open FOO, "../harness";
+open my $foo, "../harness";
opendir FOO, ".";
opendir $foo, ".";
no warnings qw(io deprecated);