浏览代码

perl: Skip crypt() tests if unavailable in t/op/tie_fetch_count.t

Signed-off-by: Marcel Denia <naoir@gmx.net>
Marcel Denia 9 年前
父节点
当前提交
948a4cc165
共有 1 个文件被更改,包括 28 次插入0 次删除
  1. 28
    0
      lang/perl/patches/600-tie_fetch_count_t-handle_missing_crypt.patch

+ 28
- 0
lang/perl/patches/600-tie_fetch_count_t-handle_missing_crypt.patch 查看文件

@@ -0,0 +1,28 @@
1
+Index: perl-5.22.0/t/op/tie_fetch_count.t
2
+===================================================================
3
+--- perl-5.22.0.orig/t/op/tie_fetch_count.t
4
++++ perl-5.22.0/t/op/tie_fetch_count.t
5
+@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>'
6
+     check_count "$op $args\\\$tied_glob$postargs";
7
+ }
8
+ 
9
+-$dummy  =   crypt $var,0; check_count 'crypt $tied, ...';
10
+-$dummy  =   crypt 0,$var; check_count 'crypt ..., $tied';
11
+-$var = substr(chr 256,0,0);
12
+-$dummy  =   crypt $var,0; check_count 'crypt $tied_utf8, ...';
13
+-$var = substr(chr 256,0,0);
14
+-$dummy  =   crypt 0,$var; check_count 'crypt ..., $tied_utf8';
15
++SKIP: {
16
++    use Config;
17
++    skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'};
18
++
19
++    $dummy  =   crypt $var,0; check_count 'crypt $tied, ...';
20
++    $dummy  =   crypt 0,$var; check_count 'crypt ..., $tied';
21
++    $var = substr(chr 256,0,0);
22
++    $dummy  =   crypt $var,0; check_count 'crypt $tied_utf8, ...';
23
++    $var = substr(chr 256,0,0);
24
++    $dummy  =   crypt 0,$var; check_count 'crypt ..., $tied_utf8';
25
++}
26
+ 
27
+ SKIP:
28
+ {