Browse Source

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

Signed-off-by: Marcel Denia <naoir@gmx.net>
lilik-openwrt-22.03
Marcel Denia 9 years ago
parent
commit
948a4cc165
1 changed files with 28 additions and 0 deletions
  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 View File

@ -0,0 +1,28 @@
Index: perl-5.22.0/t/op/tie_fetch_count.t
===================================================================
--- perl-5.22.0.orig/t/op/tie_fetch_count.t
+++ perl-5.22.0/t/op/tie_fetch_count.t
@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>'
check_count "$op $args\\\$tied_glob$postargs";
}
-$dummy = crypt $var,0; check_count 'crypt $tied, ...';
-$dummy = crypt 0,$var; check_count 'crypt ..., $tied';
-$var = substr(chr 256,0,0);
-$dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
-$var = substr(chr 256,0,0);
-$dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
+SKIP: {
+ use Config;
+ skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'};
+
+ $dummy = crypt $var,0; check_count 'crypt $tied, ...';
+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied';
+ $var = substr(chr 256,0,0);
+ $dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
+ $var = substr(chr 256,0,0);
+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
+}
SKIP:
{

Loading…
Cancel
Save