# HG changeset patch # User Maxim Dounin # Date 1714942567 -10800 # Node ID f1ba89f735ba2bbf78c5f5dcc37e1bf2929b7405 # Parent fe6f22da53ec760f7ab138d1d32b7a03ea7bdea3 Tests: fixed auth_basic.t on OpenBSD. OpenBSD does not provide any crypt() schemes except bcrypt-based "$2" anymore. As such, relevant tests are now skipped not for win32 only, but based on crypt() results. Note that just testing crypt('password', 'salt') is not enough, since Perl on win32 provides its own crypt() implementation, which is able to handle traditional DES crypt(), but rejects "$1$". diff --git a/auth_basic.t b/auth_basic.t --- a/auth_basic.t +++ b/auth_basic.t @@ -86,7 +86,9 @@ like(http_get('/'), qr!401 Unauthorized! SKIP: { -skip 'no crypt on win32', 5 if $^O eq 'MSWin32'; +skip 'no crypt', 5 + if not crypt('password', 'salt') + or not crypt('password', '$1$salt$'); like(http_get_auth('/', 'crypt', 'password'), qr!SEETHIS!, 'normal crypt'); unlike(http_get_auth('/', 'crypt', '123'), qr!SEETHIS!, 'normal wrong');