File: libperl5i

package info (click to toggle)
libconfig-model-dpkg-perl 3.014
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,200 kB
  • sloc: perl: 8,255; python: 242; makefile: 77; javascript: 16; sh: 1
file content (57 lines) | stat: -rw-r--r-- 1,973 bytes parent folder | download | duplicates (4)
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
Origin: https://github.com/doherty/perl5i
Bug: https://github.com/schwern/perl5i/issues/218
Bug: https://github.com/schwern/perl5i/issues/219
Bug-Debian: http://bugs.debian.org/655329
Bug-Debian: #124567
Bug-Debian: #215476
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-04-09


From 879a4664c556a016856975e81127535573e300e1 Mon Sep 17 00:00:00 2001
From: Mike Doherty <doherty@cs.dal.ca>
Date: Mon, 2 Apr 2012 21:59:36 -0400
Subject: [PATCH] Make one test TODO in t/utf8.t - failure caused by RT#54777

autodie (used in perl5i) causes the open pragma (used in utf8::all)
to fail to modify the default PerlIO layers. This doesn't fix the
underlying issue, it just marks the test as a known failure. Also,
don't try to delete files unless they exist.

Fixes #218
---
 t/utf8.t |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/t/utf8.t b/t/utf8.t
index d50a967..086d2ad 100644
--- a/t/utf8.t
+++ b/t/utf8.t
@@ -17,8 +17,13 @@ use Test::More;
 
     # Test the standard handles and all newly opened handles are utf8
     ok open my $test_fh, ">", "perlio_test";
-    END { unlink "perlio_test" }
-    for my $fh (*STDOUT, *STDIN, *STDERR, $test_fh) {
+    END { unlink 'perlio_test' if -e 'perlio_test' }
+    TODO: {
+        local $TODO = 'autodie clobbers IO layers';
+        my @layers = PerlIO::get_layers($test_fh);
+        ok(@layers->grep(qr/utf8/)->flatten) or diag explain { $test_fh => \@layers};
+    }
+    for my $fh (*STDOUT, *STDIN, *STDERR) {
         my @layers = PerlIO::get_layers($fh);
         ok(@layers->grep(qr/utf8/)->flatten) or diag explain { $fh => \@layers };
     }
@@ -28,7 +33,7 @@ use Test::More;
 # And off
 {
     ok open my $test_fh, ">", "perlio_test2";
-    END { unlink "perlio_test2" }
+    END { unlink 'perlio_test2' if -e 'perlio_test2' }
 
     my @layers = PerlIO::get_layers($test_fh);
     ok( !grep /utf8/, @layers ) or diag explain { $test_fh => \@layers };
-- 
1.7.9.5