summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2021-02-13 10:03:36 +0100
committerYves Orton <demerphq@gmail.com>2021-02-13 13:33:07 +0100
commitbf28d609baed1fccc7b09b8b797dcd67b8eb5ae7 (patch)
tree86edfd6d69ad082294f531dbd7a0e287b593fc8c
parent8bc8b6db1481526395ac3feb7ea9e69413e76351 (diff)
downloadperl-bf28d609baed1fccc7b09b8b797dcd67b8eb5ae7.tar.gz
If a file has been deleted and removed from the MANIFEST don't complain
git ls-files returns the list of currently staged files. If a patch is aimed at removing a file, thus deleting it and removing it from MANIFEST but the dev has not staged the changes we should not say it fails test.
-rw-r--r--t/porting/manifest.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/porting/manifest.t b/t/porting/manifest.t
index 27aea1dc2a..666c2d9204 100644
--- a/t/porting/manifest.t
+++ b/t/porting/manifest.t
@@ -86,14 +86,16 @@ SKIP: {
SKIP: {
find_git_or_skip(6);
my %seen; # De-dup ls-files output (can appear more than once)
- chomp(my @repo= grep {
+ my @repo= grep {
+ chomp();
!m{\.git_patch$} &&
!m{\.gitattributes$} &&
!m{\.gitignore$} &&
!m{\.mailmap$} &&
!m{^\.github/} &&
+ -e $_ &&
!$seen{$_}++
- } `git ls-files`);
+ } `git ls-files`;
skip("git ls-files didnt work",3)
if !@repo;
is( 0+@repo, 0+@files, "git ls-files gives the same number of files as MANIFEST lists");