<commit_before><commit_msg>oops, forget test file<commit_after>#!/usr/bin/perl

use lib '.'; use lib 't';
use SATest; sa_t_init("db_based_whitelist_ips");
use Test; BEGIN { plan tests => 3 };

# ---------------------------------------------------------------------------

%is_nonspam_patterns = (
q{ Subject: Re: [SAtalk] auto-whitelisting}, 'subj',
);
%is_spam_patterns = (
q{Subject: *****SPAM***** 4000           Your Vacation Winning !}, 'subj',
);

%patterns = %is_nonspam_patterns;
$scr_test_args = "-M Mail::SpamAssassin::DBBasedAddrList";

# 3 times, to get into the whitelist:
sarun ("-L -a -t < data/nice/002", \&patterns_run_cb);
sarun ("-L -a -t < data/nice/002", \&patterns_run_cb);
sarun ("-L -a -t < data/nice/002", \&patterns_run_cb);

# Now check
ok (sarun ("-L -a -t < data/nice/002", \&patterns_run_cb));
ok_all_patterns();

%patterns = %is_spam_patterns;
sarun ("-L -a -t < data/spam/007", \&patterns_run_cb);
ok_all_patterns();


{'fraction_non_alphanumeric': 0.25894736842105265, 'fraction_numerical': 0.022105263157894735, 'mean_word_length': 3.046808510638298, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 4, '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': '3365991', 'n_tokens_mistral': 400, 'n_tokens_neox': 373, 'n_words': 82}