700-tie_fetch_count_t-handle_missing_crypt.patch 927 B

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