]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - t/not-truncated.t
Add a test asserting that no plugin is an empty file
[git.ikiwiki.info.git] / t / not-truncated.t
1 #!/usr/bin/perl
2 # Regression test for a weird build issue where wikitext.pm was installed
3 # as an empty file, possibly caused by parallel builds. This was hopefully
4 # fixed by making the build steps more robust in 3.20180228.
5 # https://buildd.debian.org/status/fetch.php?pkg=ikiwiki&arch=all&ver=3.20180105-1&stamp=1515285462&raw=0
6 # -rw-r--r-- root/root         0 2018-01-06 23:20 ./usr/share/perl5/IkiWiki/Plugin/wikitext.pm
7 use warnings;
8 use strict;
9 use Test::More;
11 my @libs="IkiWiki.pm";
12 push @libs, map { chomp; $_ } `find IkiWiki -type f -name \\*.pm`;
14 plan(tests => scalar @libs);
16 FILE: foreach my $file (@libs) {
17         foreach my $libdir (@INC) {
18                 if (-e "$libdir/$file") {
19                         ok(-s "$libdir/$file", "$file available in $libdir and not truncated");
20                         next FILE;
21                 }
22         }
23         fail("$file not available in ".join(':', @INC));
24 }