From 3346c9914a651259485e4c3d38a289a4c3c79806 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Wed, 6 Nov 2024 10:22:02 -0500 Subject: [PATCH] More testing of clone --- t/20-new.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/20-new.t b/t/20-new.t index 2ed2baa..8cb8472 100644 --- a/t/20-new.t +++ b/t/20-new.t @@ -3,7 +3,7 @@ use strict; # use lib 'lib'; -use Test::Most tests => 6; +use Test::Most tests => 7; BEGIN { use_ok('CGI::Info'); @@ -20,4 +20,5 @@ cmp_ok($info->{max_upload_size}, '==', 1024 * 1024, 'direct key-value pairs'); # Test cloning behavior by calling new() on an existing object my $info2 = $info->new({ allow => [ 'gif' ], upload_dir => '/var/uploads' }); -cmp_ok($info2->{upload_dir}, 'eq', '/var/uploads', 'clone'); +cmp_ok($info2->{max_upload_size}, '==', 1024 * 1024, 'clone keeps old args'); +cmp_ok($info2->{upload_dir}, 'eq', '/var/uploads', 'clone adds new args');