File: autopkgtest.patch

package info (click to toggle)
libfile-slurp-tiny-perl 0.004-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 160 kB
  • sloc: perl: 166; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 735 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
Description: skip tests when run under autopkgtest
 where the source tree is not available
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2018-04-08

--- a/t/10-basics.t
+++ b/t/10-basics.t
@@ -23,8 +23,11 @@
 chomp @content;
 is_deeply([ read_lines($0, chomp => 1) ], \@content, 'read_lines(chomp => 1) returns the right thing');
 
+SKIP: {
+skip "No 'lib' directory available under autopkgtest", 2 if $ENV{ADTTMP};
 is_deeply([ read_dir('lib') ], [ 'File' ], 'read_dir appears to work');
 is_deeply([ read_dir('lib', prefix => 1) ], [ catfile(qw/lib File/) ], 'read_dir(prefix => 1) appears to work');
+};
 
 my $dir = tempdir( CLEANUP => 1 );
 my $filename = catfile($dir, 'out.txt');