File: prefs_include.t

package info (click to toggle)
spamassassin 3.1.7-2etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 5,404 kB
  • ctags: 2,123
  • sloc: perl: 39,706; ansic: 3,133; sh: 2,009; sql: 170; makefile: 168
file content (32 lines) | stat: -rwxr-xr-x 793 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl

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

$ENV{'LANGUAGE'} = $ENV{'LC_ALL'} = 'C';             # a cheat, but we need the patterns to work

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

%patterns = (

    q{X-Spam-Report: =?ISO-8859-1?Q? }, 'qp-encoded-hdr',
    q{ Invalid Date: header =ae =af =b0 foo }, 'qp-encoded-desc',

);

tstprefs ("
        $default_cf_lines
        include prefs_include.inc
        ");

open (OUT, ">log/prefs_include.inc") or die "open log/prefs_include.inc failed";
print OUT "
        report_safe 0
	describe INVALID_DATE	Invalid Date: header \xae \xaf \xb0 foo
	";
close OUT;

sarun ("-L -t < data/spam/001", \&patterns_run_cb);
ok_all_patterns();