aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2018-03-09 09:12:19 +0000
committerSimon McVittie <smcv@debian.org>2018-03-09 09:12:19 +0000
commit352d34fb2e853b75722f98af2b331c15abc684dc (patch)
tree460cb256363836f572edf8276499cab28d6af39e /t
parente3279c8b508ce88ea2b23f99a1d8a4295fb06dd9 (diff)
downloadikiwiki-352d34fb2e853b75722f98af2b331c15abc684dc.tar
ikiwiki-352d34fb2e853b75722f98af2b331c15abc684dc.tar.gz
Add a test asserting that no plugin is an empty file
I'm still not completely sure how it happened, and I can't reproduce it myself, but in the Debian build of ikiwiki 3.20180105, wikitext.pm ended up empty. The build fixes in commits 3aacac3b, efcbeaa0, b32480f0 hopefully fixed this. Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 't')
-rwxr-xr-xt/not-truncated.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/not-truncated.t b/t/not-truncated.t
new file mode 100755
index 000000000..15450c267
--- /dev/null
+++ b/t/not-truncated.t
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+# Regression test for a weird build issue where wikitext.pm was installed
+# as an empty file, possibly caused by parallel builds. This was hopefully
+# fixed by making the build steps more robust in 3.20180228.
+# https://buildd.debian.org/status/fetch.php?pkg=ikiwiki&arch=all&ver=3.20180105-1&stamp=1515285462&raw=0
+# -rw-r--r-- root/root 0 2018-01-06 23:20 ./usr/share/perl5/IkiWiki/Plugin/wikitext.pm
+use warnings;
+use strict;
+use Test::More;
+
+my @libs="IkiWiki.pm";
+push @libs, map { chomp; $_ } `find IkiWiki -type f -name \\*.pm`;
+
+plan(tests => scalar @libs);
+
+FILE: foreach my $file (@libs) {
+ foreach my $libdir (@INC) {
+ if (-e "$libdir/$file") {
+ ok(-s "$libdir/$file", "$file available in $libdir and not truncated");
+ next FILE;
+ }
+ }
+ fail("$file not available in ".join(':', @INC));
+}