File: Test-AutoLoader-0.03-Skip-POSIX-tests-with-perl-5.16.patch

package info (click to toggle)
libtest-autoloader-perl 0.03-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 140 kB
  • ctags: 5
  • sloc: perl: 165; makefile: 2
file content (59 lines) | stat: -rw-r--r-- 2,460 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Description: [perldelta 5.16] POSIX no longer uses AutoLoader.
 Any code which was relying on this implementation detail was buggy, and may
 fail because of this change. Not using AutoLoader is the reason why the al
 files are missing.
Origin: CPAN RT
Bug: https://rt.cpan.org/Ticket/Display.html?id=77942
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/711259
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2013-06-16

From 7f347d684936c6108e658ba6c12e43b7e62562f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 21 Jun 2012 10:49:01 +0200
Subject: [PATCH] Skip POSIX tests with perl 5.16

---
 t/00basic.t |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/t/00basic.t b/t/00basic.t
index 94f1a4f..462d8e0 100644
--- a/t/00basic.t
+++ b/t/00basic.t
@@ -35,6 +35,7 @@ require EmptyModule;
 my @unreadable = (File::Spec->catdir(qw(tlib auto TestBusted1)),
                   File::Spec->catfile(qw(tlib auto TestBusted2 no_ready.al)));
 my $CAN_CHMOD =  chmod 0000, @unreadable;
+my $POSIX_USES_AUTOLOAD = $^V lt v5.16.0;
 my $file_errors;
 $file_errors .=<<DIAG if $CAN_CHMOD;
     couldn't load no_ready.al: Permission denied
@@ -46,8 +47,6 @@ DIAG
 
 
 my @tests = (
-  [ ['POSIX'],{ok=>1,name=>"Autoload of POSIX (all files)"},"Standard-distribution module, all files"],
-  [ [qw(POSIX strcpy)],{ok=>1,name=>"Autoload of POSIX (listed subroutines)"},"Standard-distribution module, one file"],
   [ [qw(POSIX no_such_function)], {ok=>0,diag=>"    couldn't load no_such_function.al: No such file or directory"}, "Standard-distribution, bad subroutine name"],
   [ [qw(strict)], {ok=>0,diag=>"Unable to find valid autoload directory for strict"}, "Non-existent auto directory"],
   [ [qw(EmptyModule)], {ok=>0,diag=>"No autoloaded files found"}, "No files in auto directory"],
@@ -59,6 +58,14 @@ my @tests = (
 
 );
 
+if ($POSIX_USES_AUTOLOAD) {
+    push @tests,
+      [ ['POSIX'],{ok=>1,name=>"Autoload of POSIX (all files)"},"Standard-distribution module, all files"],
+      [ [qw(POSIX strcpy)],{ok=>1,name=>"Autoload of POSIX (listed subroutines)"},"Standard-distribution module, one file"];
+} else {
+  SKIP:{skip "POSIX module does not use AutoLoader",12}
+}
+
 if ($CAN_CHMOD) {
     push @tests, 
       [ [qw(TestBusted1)], {ok=>0,diag=>"Unable to find valid autoload directory for TestBusted1"}, "Unreadable auto directory"],
-- 
1.7.7.6