<commit_before>use strict;
use Test::More;
use lib qw(./lib ./blib/lib);
use Sisimai::MTA::Sendmail;

my $PackageName = 'Sisimai::MTA::Sendmail';
my $MethodNames = {
    'class' => [ 
        'version', 'description', 'headerlist', 'scan',
        'SMTPCOMMAND', 'DELIVERYSTATUS', 'RFC822HEADERS',
    ],
    'object' => [],
};
my $ReturnValue = {
    '01' => { 'status' => qr/\A5[.]1[.]1\z/, 'reason' => qr/userunknown/ },
    '02' => { 'status' => qr/\A5[.][12][.]1\z/, 'reason' => qr/(?:userunknown|filtered)/ },
    '03' => { 'status' => qr/\A5[.]1[.]1\z/, 'reason' => qr/userunknown/ },
    '04' => { 'status' => qr/\A5[.]1[.]8\z/, 'reason' => qr/rejected/ },
    '05' => { 'status' => qr/\A5[.]2[.]3\z/, 'reason' => qr/mesgtoobig/ },
    '06' => { 'status' => qr/\A5[.]6[.]9\z/, 'reason' => qr/contenterror/ },
    '07' => { 'status' => qr/\A5[.]0[.]0\z/, 'reason' => qr/norelaying/ },
    '08' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/expired/ },
    '09' => { 'status' => qr/\A5[.]7[.]9\z/, 'reason' => qr/securityerror/ },
    '10' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/blocked/ },
    '11' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/expired/ },
    '12' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/expired/ },
    '13' => { 'status' => qr/\A5[.]3[.]0\z/, 'reason' => qr/systemerror/ },
    '14' => { 'status' => qr/\A5[.]1[.]1\z/, 'reason' => qr/userunknown/ },
    '15' => { 'status' => qr/\A5[.]1[.]2\z/, 'reason' => qr/hostunknown/ },
    '16' => { 'status' => qr/\A5[.]5[.]0\z/, 'reason' => qr/blocked/ },
    '17' => { 'status' => qr/\A5[.]1[.]6\z/, 'reason' => qr/hasmoved/ },
};

use_ok $PackageName;
can_ok $PackageName, @{ $MethodNames->{'class'} };

MAKE_TEST: {
    my $v = undef;
    my $c = 0;

    $v = $PackageName->version;
    ok $v, '->version = '.$v;
    $v = $PackageName->description;
    ok $v, '->description = '.$v;

    $v = $PackageName->smtpagent;
    ok $v, '->smtpagent = '.$v;

    is $PackageName->scan, undef, '->scan';
<commit_msg>Update test code: sendmail-18.eml<commit_after>use strict;
use Test::More;
use lib qw(./lib ./blib/lib);
use Sisimai::MTA::Sendmail;

my $PackageName = 'Sisimai::MTA::Sendmail';
my $MethodNames = {
    'class' => [ 
        'version', 'description', 'headerlist', 'scan',
        'SMTPCOMMAND', 'DELIVERYSTATUS', 'RFC822HEADERS',
    ],
    'object' => [],
};
my $ReturnValue = {
    '01' => { 'status' => qr/\A5[.]1[.]1\z/, 'reason' => qr/userunknown/ },
    '02' => { 'status' => qr/\A5[.][12][.]1\z/, 'reason' => qr/(?:userunknown|filtered)/ },
    '03' => { 'status' => qr/\A5[.]1[.]1\z/, 'reason' => qr/userunknown/ },
    '04' => { 'status' => qr/\A5[.]1[.]8\z/, 'reason' => qr/rejected/ },
    '05' => { 'status' => qr/\A5[.]2[.]3\z/, 'reason' => qr/mesgtoobig/ },
    '06' => { 'status' => qr/\A5[.]6[.]9\z/, 'reason' => qr/contenterror/ },
    '07' => { 'status' => qr/\A5[.]0[.]0\z/, 'reason' => qr/norelaying/ },
    '08' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/expired/ },
    '09' => { 'status' => qr/\A5[.]7[.]9\z/, 'reason' => qr/securityerror/ },
    '10' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/blocked/ },
    '11' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/expired/ },
    '12' => { 'status' => qr/\A4[.]4[.]7\z/, 'reason' => qr/expired/ },
    '13' => { 'status' => qr/\A5[.]3[.]0\z/, 'reason' => qr/systemerror/ },
    '14' => { 'status' => qr/\A5[.]1[.]1\z/, 'reason' => qr/userunknown/ },
    '15' => { 'status' => qr/\A5[.]1[.]2\z/, 'reason' => qr/hostunknown/ },
    '16' => { 'status' => qr/\A5[.]5[.]0\z/, 'reason' => qr/blocked/ },
    '17' => { 'status' => qr/\A5[.]1[.]6\z/, 'reason' => qr/hasmoved/ },
    '18' => { 'status' => qr/\A5[.]0[.]0\z/, 'reason' => qr/mailererror/ },
};

use_ok $PackageName;
can_ok $PackageName, @{ $MethodNames->{'class'} };

MAKE_TEST: {
    my $v = undef;
    my $c = 0;

    $v = $PackageName->version;
    ok $v, '->version = '.$v;
    $v = $PackageName->description;
    ok $v, '->description = '.$v;

    $v = $PackageName->smtpagent;
    ok $v, '->smtpagent = '.$v;

    is $PackageName->scan, undef, '->scan';

{'fraction_non_alphanumeric': 0.31723300970873786, 'fraction_numerical': 0.04538834951456311, 'mean_word_length': 2.686046511627907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 130, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6847072', 'n_tokens_mistral': 1912, 'n_tokens_neox': 1856, 'n_words': 298}