File: t-eol.t-when-running-under-adt-run-test-installed-mo.patch

package info (click to toggle)
libdist-zilla-plugin-test-eol-perl 0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 348 kB
  • ctags: 7
  • sloc: perl: 340; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 985 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: intrigeri <intrigeri@boum.org>
Date: Sun, 16 Aug 2015 09:10:01 +0000
Forwarded: not-needed
Subject: t/eol.t: when running under adt-run,
 test installed module files instead of the ones that can't be found
 in the minimal testing source tree.

---
 t/eol.t | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/t/eol.t b/t/eol.t
index ef07e89..e8b690b 100644
--- a/t/eol.t
+++ b/t/eol.t
@@ -7,8 +7,6 @@ use Test::More 0.88;
 use Test::EOL;
 
 my @files = (
-    'lib/Dist/Zilla/Plugin/EOLTests.pm',
-    'lib/Dist/Zilla/Plugin/Test/EOL.pm',
     't/00-report-prereqs.dd',
     't/00-report-prereqs.t',
     't/01-basic.t',
@@ -35,5 +33,12 @@ my @files = (
     'xt/release/minimum-version.t'
 );
 
+my $prefix = $ENV{ADTTMP} ? '/usr/share/perl5' : 'lib';
+
+unshift @files, (
+    "${prefix}/Dist/Zilla/Plugin/EOLTests.pm",
+    "${prefix}/Dist/Zilla/Plugin/Test/EOL.pm",
+);
+
 eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
 done_testing;