File: autopkgtest.patch

package info (click to toggle)
libmodule-extractuse-perl 0.341-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 872 kB
  • ctags: 81
  • sloc: perl: 11,270; makefile: 17
file content (44 lines) | stat: -rw-r--r-- 1,595 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
38
39
40
41
42
43
44
Description: use $Config{vendorlib} when run under autopktest
 as discovered by $ENV{ADTTMP}
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2014-10-17

--- a/t/20_parse_self.t
+++ b/t/20_parse_self.t
@@ -4,13 +4,14 @@ use Test::More tests=>13;
 use Test::Deep;
 use Test::NoWarnings;
 use Module::ExtractUse;
+use Config;
 
 # test testfile
 {
     my $p=Module::ExtractUse->new;
     my @used=$p->extract_use($0)->array;
     cmp_deeply(\@used,
-	       bag(qw(strict Test::More Test::Deep Test::NoWarnings Module::ExtractUse)),
+	       bag(qw(strict Test::More Test::Deep Test::NoWarnings Module::ExtractUse Config)),
 	       'modules used in this test script'
 	      );
     @used=$p->extract_use($0)->array_in_eval;
@@ -20,7 +21,7 @@ use Module::ExtractUse;
 	      );
     @used=$p->extract_use($0)->array_out_of_eval;
     cmp_deeply(\@used,
-	       bag(qw(strict Test::More Test::Deep Test::NoWarnings Module::ExtractUse)),
+	       bag(qw(strict Test::More Test::Deep Test::NoWarnings Module::ExtractUse Config)),
 	       'mandatory modules used in this test script'
 	      );
 }
@@ -28,7 +29,8 @@ use Module::ExtractUse;
 # test Module::ExtractUse
 {
     my $p=Module::ExtractUse->new;
-    $p->extract_use('lib/Module/ExtractUse.pm');
+    my $dir = $ENV{ADTTMP} ? $Config{vendorlib} : "lib";
+    $p->extract_use("$dir/Module/ExtractUse.pm");
     cmp_deeply($p->arrayref,
 	       bag(qw(strict warnings Pod::Strip Parse::RecDescent Module::ExtractUse::Grammar Carp 5.008)),
 	       'modules used in this Module::ExtractUsed');