diff options
-rw-r--r-- | t/004template.t | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/t/004template.t b/t/004template.t index 3b858c0b3..ce18619e7 100644 --- a/t/004template.t +++ b/t/004template.t @@ -60,11 +60,16 @@ my $fh; # fall back to English if necessary. foreach my $file (@referenced_files) { - my $path = File::Spec->catfile($english_default_include_path, $file); - if (-e $path) { - ok(1, "$path exists"); + my @path = map(File::Spec->catfile($_, $file), @include_paths); + push(@path, File::Spec->catfile($english_default_include_path, $file)); + my $found; + foreach my $path (@path) { + $found = $path if -e $path; + } + if ($found) { + ok(1, "$file exists"); } else { - ok(0, "$path cannot be located --ERROR"); + ok(0, "$file cannot be located --ERROR"); } } |