From 8316c01bac12529a7ca28ff7ed325eba7dfa21c8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 19 Jun 2026 13:29:48 +0200 Subject: [PATCH] Bug 41706: Add a test Signed-off-by: Jonathan Druart Amended: - $marc->append_fields( MARC::Field->new( '100', ' ', ' ', a => 'Aristotle.' ) ); - marc2cites($marc); + $marc_record->append_fields( MARC::Field->new( '100', ' ', ' ', a => 'Aristotle.' ) ); + marc2cites($marc_record); Signed-off-by: Pedro Amorim --- t/db_dependent/Record.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Record.t b/t/db_dependent/Record.t index fb5f3f327d..b4c375cb6e 100755 --- a/t/db_dependent/Record.t +++ b/t/db_dependent/Record.t @@ -3,7 +3,7 @@ use Modern::Perl; use Test::NoWarnings; -use Test::More tests => 17; +use Test::More tests => 18; use MARC::Record; use t::lib::Mocks; @@ -160,3 +160,11 @@ is( $cites->{'Chicago'}, 'Rowling J.K, . 2011. Harry potter: the cursed child. Hogwarts: Reprints.', 'testing marc2cites' ); + +subtest 'prevent warnings in marc2cites' => sub { + plan tests => 1; + my $marc_record = MARC::Record->new(); + $marc_record->append_fields( MARC::Field->new( '100', ' ', ' ', a => 'Aristotle.' ) ); + marc2cites($marc_record); + pass("Test should not have generated a warning"); +};