diff options
author | Yves Orton <demerphq@gmail.com> | 2022-10-23 13:23:56 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-10-26 14:19:00 +0200 |
commit | 0ae7464efdff72057398b101250f8013d47192af (patch) | |
tree | ac926b1b0059845b2dcafe466c14394c504759f6 /t/porting | |
parent | 7b038bdfcf431a73f1f1fa9c4494322ed4fc8ae2 (diff) | |
download | perl-0ae7464efdff72057398b101250f8013d47192af.tar.gz |
porting/diag.t - allow it to be run from the root directory
I think this used to work before we removed "." from @INC and
nobody noticed when we made that change. This adds it back into
@INC if necessary like we would have from t/.
Diffstat (limited to 't/porting')
-rw-r--r-- | t/porting/diag.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/porting/diag.t b/t/porting/diag.t index fc34c6b5bd..2dfd2f8358 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -1,7 +1,11 @@ #!/usr/bin/perl BEGIN { - @INC = '..' if -f '../TestInit.pm'; + if (-f './TestInit.pm') { + @INC = '.'; + } elsif (-f '../TestInit.pm') { + @INC = '..'; + } } use TestInit qw(T); # T is chdir to the top level |