~ubuntu-branches/ubuntu/utopic/spamassassin/utopic-updates

« back to all changes in this revision

Viewing changes to t/autolearn_force.t

  • Committer: Package Import Robot
  • Author(s): Noah Meyerhans
  • Date: 2014-02-14 22:45:15 UTC
  • mfrom: (0.8.1) (0.6.2) (5.1.22 sid)
  • Revision ID: package-import@ubuntu.com-20140214224515-z1es2twos8xh7n2y
Tags: 3.4.0-1
* New upstream version! (Closes: 738963, 738872, 738867)
* Scrub the environment when switching to the debian-spamd user in
  postinst and cron.daily. (Closes: 738951)
* Enhancements to postinst to better manage ownership of
  /var/lib/spamassassin, via Iain Lane <iain.lane@canonical.com>
  (Closes: 738974)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use lib '.'; use lib 't';
 
4
use SATest; sa_t_init("autolearn_force");
 
5
use Test;
 
6
 
 
7
use constant TEST_ENABLED => eval { require DB_File; };
 
8
 
 
9
BEGIN {
 
10
  plan tests => (TEST_ENABLED ? 2 : 0);
 
11
};
 
12
 
 
13
exit unless TEST_ENABLED;
 
14
 
 
15
 
 
16
# ---------------------------------------------------------------------------
 
17
 
 
18
%patterns = (
 
19
 
 
20
q{ autolearn=spam autolearn_force=yes } => 'autolearned as spam with autolearn_force'
 
21
 
 
22
);
 
23
 
 
24
%anti_patterns = (
 
25
);
 
26
 
 
27
tstprefs ('
 
28
 
 
29
body    AUTOLEARNTEST_BODY      /EVOLUTION PREVIEW RELEASE/
 
30
score   AUTOLEARNTEST_BODY      7.0
 
31
tflags  AUTOLEARNTEST_BODY      autolearn_force
 
32
 
 
33
use_bayes 1
 
34
bayes_auto_learn 1
 
35
bayes_auto_learn_threshold_spam 6.0
 
36
 
 
37
');
 
38
 
 
39
ok (sarun ("-L -t < data/nice/001", \&patterns_run_cb));
 
40
ok_all_patterns();