1use strict; 2use warnings; 3 4use Test::More tests => 2; 5 6# Ticket 52924: Ensure we add < > arround Content-ID header contents. 7 8use MIME::Entity; 9 10my $bare_id = '123456789.09876@host.example.com'; 11 12my $e = MIME::Entity->build( 13 Path => "./testin/short.txt", 14 Id => $bare_id, 15); 16is( $e->head->mime_attr('content-id'), "<$bare_id>", '<> added around bare Id value when creating'); 17 18undef $e; 19$e = MIME::Entity->build( 20 Path => "./testin/short.txt", 21 Id => "<$bare_id>", 22); 23is( $e->head->mime_attr('content-id'), "<$bare_id>", '<> not added around Id value when already present'); 24