From 8e4a00010331fe5243c9550a7adce09e9e044a23 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Wed, 11 May 2022 17:12:48 -0600 Subject: [PATCH] Prereq Test::More 1.001004_001 to fix broken tests --- Changes | 2 +- t/crypt.t | 2 ++ t/database.t | 4 ++-- t/kdb.t | 2 +- t/kdbx4.t | 2 +- t/keys.t | 2 +- t/memory-protection.t | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index 65781fc..3d5f759 100644 --- a/Changes +++ b/Changes @@ -3,7 +3,7 @@ Revision history for File-KDBX. {{$NEXT}} * Fixed parsing KDBX4 datetimes on 32-bit perls. - * Fixed broken bigint tests on perls < 5.14. + * Fixed broken tests on perls < 5.14. 0.902 2022-05-03 19:18:06-0600 diff --git a/t/crypt.t b/t/crypt.t index c003a5f..69a52ef 100644 --- a/t/crypt.t +++ b/t/crypt.t @@ -15,6 +15,7 @@ use Test::More; subtest 'Round-trip block stream' => sub { plan tests => 3; + my $block_cipher = File::KDBX::Cipher->new(uuid => CIPHER_UUID_AES256, key => 0x01 x 32, iv => 0x01 x 16); test_roundtrip($block_cipher, 'Smell the pretty flowers.', @@ -24,6 +25,7 @@ subtest 'Round-trip block stream' => sub { subtest 'Round-trip cipher stream' => sub { plan tests => 3; + my $cipher_stream = File::KDBX::Cipher->new(stream_id => 2, key => 0x01 x 16); test_roundtrip($cipher_stream, 'Smell the pretty flowers.', diff --git a/t/database.t b/t/database.t index 94e1ea8..997d04c 100644 --- a/t/database.t +++ b/t/database.t @@ -11,7 +11,7 @@ use TestCommon; use File::KDBX; use File::Temp qw(tempfile); use Test::Deep; -use Test::More; +use Test::More 1.001004_001; use Time::Piece; subtest 'Create a new database' => sub { @@ -49,7 +49,7 @@ subtest 'Clone' => sub { my @objects = $copy->objects->each; subtest 'Cloned objects refer to the cloned database' => sub { plan tests => scalar @_; - for my $object (@objects) { + for my $object (@_) { my $object_kdbx = eval { $object->kdbx }; is $object_kdbx, $copy, 'Object: ' . $object->label; } diff --git a/t/kdb.t b/t/kdb.t index 02927e8..ccaeda3 100644 --- a/t/kdb.t +++ b/t/kdb.t @@ -9,7 +9,7 @@ use TestCommon; use Encode qw(decode); use File::KDBX; use Test::Deep; -use Test::More; +use Test::More 1.001004_001; eval { require File::KeePass; require File::KeePass::KDBX } or plan skip_all => 'File::KeePass and File::KeePass::KDBX required to test KDB files'; diff --git a/t/kdbx4.t b/t/kdbx4.t index d82dc4b..ff48700 100644 --- a/t/kdbx4.t +++ b/t/kdbx4.t @@ -10,7 +10,7 @@ use TestCommon; use File::KDBX; use File::KDBX::Constants qw(:version :kdf); use Test::Deep; -use Test::More; +use Test::More 1.001004_001; use boolean qw(:all); subtest 'Verify Format400' => sub { diff --git a/t/keys.t b/t/keys.t index 601260c..0bcf4dc 100644 --- a/t/keys.t +++ b/t/keys.t @@ -10,7 +10,7 @@ use Crypt::Misc 0.029 qw(decode_b64 encode_b64); use File::KDBX::Constants qw(:key_file); use File::KDBX::Key; use File::Temp qw(tempfile); -use Test::More; +use Test::More 1.001004_001; subtest 'Primitives' => sub { my $pkey = File::KDBX::Key->new('password'); diff --git a/t/memory-protection.t b/t/memory-protection.t index 328e28c..5ca4079 100644 --- a/t/memory-protection.t +++ b/t/memory-protection.t @@ -17,7 +17,7 @@ use List::Util qw(max); use POSIX (); use Scalar::Util qw(looks_like_number); use Scope::Guard; -use Test::More; +use Test::More 1.001004_001; BEGIN { if (!$ENV{AUTHOR_TESTING}) { -- 2.43.0