From e27838ce78be16427b059986b3781eb969a6aca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=8Dan?= Date: Mon, 16 Mar 2026 07:47:52 -0600 Subject: [PATCH] test: fix key_lifecycle.t plan mismatch and Bignum detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two bugs: 1. $INC{} check for Bignum fails because RSA.pm doesn't load it eagerly — use eval { require } instead for reliable detection 2. Plan was conditional (9 without Bignum) but skip() reports skipped tests toward the total, so plan must always be 23 Co-Authored-By: Claude Opus 4.6 --- t/key_lifecycle.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/key_lifecycle.t b/t/key_lifecycle.t index 451062d..4ad93d9 100644 --- a/t/key_lifecycle.t +++ b/t/key_lifecycle.t @@ -7,7 +7,7 @@ use Crypt::OpenSSL::RSA; Crypt::OpenSSL::Random::random_seed("OpenSSL needs at least 32 bytes."); Crypt::OpenSSL::RSA->import_random_seed(); -my $HAS_BIGNUM = $INC{'Crypt/OpenSSL/Bignum.pm'} ? 1 : 0; +my $HAS_BIGNUM = eval { require Crypt::OpenSSL::Bignum; 1 } ? 1 : 0; # skip() reports skipped tests which count toward total, so plan must # always include them regardless of whether Bignum is available.