proxmox-spamassassin/upstream/t/basic_lint.t
Stoiko Ivanov f887dfc0c7 update SpamAssassin to 4.0.1
generated by make update-upstream

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2024-05-31 17:16:10 +02:00

39 lines
791 B
Perl
Executable File

#!/usr/bin/perl -T
use lib '.'; use lib 't';
use SATest; sa_t_init("basic_lint");
use Test::More;
tstpre ("
loadplugin Mail::SpamAssassin::Plugin::AWL
");
@test_locales = qw(C);
if (!$RUNNING_ON_WINDOWS) {
# Test with few random additional locales if available
my $locales = untaint_cmd("locale -a");
while ($locales =~ /^((?:C|en_US|fr_FR|zh_CN)\.(?:utf|iso).*)$/gmi) {
push @test_locales, $1;
}
}
plan tests => scalar(@test_locales);
# ---------------------------------------------------------------------------
%patterns = (
qr/^/, 'anything',
);
foreach my $locale (@test_locales) {
my $language = $locale;
$language =~ s/[._].*//;
$ENV{'LANGUAGE'} = $language;
$ENV{'LC_ALL'} = $locale;
sarun ("-L --lint", \&patterns_run_cb);
ok_all_patterns();
}