From: Jarkko Hietaniemi Date: Mon, 10 Sep 2001 12:42:24 +0000 (+0000) Subject: Skip the crypt test if no crypt. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=17f79ebbbd3973522217b30539c665cfc7641376;p=p5sagit%2Fp5-mst-13.2.git Skip the crypt test if no crypt. p4raw-id: //depot/perl@11975 --- diff --git a/t/op/crypt.t b/t/op/crypt.t index 26eb06a..2619338 100644 --- a/t/op/crypt.t +++ b/t/op/crypt.t @@ -1,4 +1,5 @@ use Test::More tests => 2; +use Config; # Can't assume too much about the string returned by crypt(), # and about how many bytes of the encrypted (really, hashed) @@ -10,6 +11,10 @@ use Test::More tests => 2; # bets, given alternative encryption/hashing schemes like MD5, # C2 (or higher) security schemes, and non-UNIX platforms. -ok(substr(crypt("ab", "cd"), 2) ne substr(crypt("ab", "ce"), 2), "salt"); +SKIP: { + skip "crypt unimplemented", 2, unless $Config{d_crypt}; + + ok(substr(crypt("ab", "cd"), 2) ne substr(crypt("ab", "ce"), 2), "salt"); -ok(crypt("HI", "HO") eq crypt(v4040.4041, "HO"), "Unicode"); + ok(crypt("HI", "HO") eq crypt(v4040.4041, "HO"), "Unicode"); +}