File: autopkgtest.patch

package info (click to toggle)
libpod-abstract-perl 0.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: perl: 2,373; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 835 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: look for file in different directory when run under autopkgtest
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2025-11-16

--- a/t/06_pa_example.t
+++ b/t/06_pa_example.t
@@ -10,9 +10,12 @@
 # This test is just to validate that the example provided at the start of the
 # Pod::Abstract documentation actually works!
 
+use Config;
+my $dir = $ENV{AUTOPKGTEST_TMP} ? $Config{vendorlib} : 'lib';
+
 # Get all the first level headings, and put them in a verbatim block
 # at the start of the document
-my $pa = Pod::Abstract->load_file('lib/Pod/Abstract.pm');
+my $pa = Pod::Abstract->load_file("$dir/Pod/Abstract.pm");
 my @headings = $pa->select('/head1@heading');
 my @headings_text = map { $_->pod } @headings;
 my $headings_node = node->verbatim(join "\n",@headings_text);