File: basic_lint_without_sandbox.t

package info (click to toggle)
spamassassin 3.4.0-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,296 kB
  • ctags: 2,968
  • sloc: perl: 54,007; ansic: 3,397; sh: 590; makefile: 195; sql: 176; python: 17
file content (31 lines) | stat: -rwxr-xr-x 869 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/perl
#
# ensure the rules files work without rules/70_sandbox.cf

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

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

%patterns = (

q{  }, 'anything',

);

# override locale for this test!
$ENV{'LANGUAGE'} = $ENV{'LC_ALL'} = 'C';

my $scoresfile  = "log/test_rules_copy/50_scores.cf";
my $sandboxfile = "log/test_rules_copy/70_sandbox.cf";

# when running from the built tarball or make disttest, we will not have a full
# rules dir -- therefore no 70_sandbox.cf.  We will also have no 50_scores.cf,
# so we can use that to tell if this is the case
skip (!-f $scoresfile, -f $sandboxfile);
unlink $sandboxfile;
skip (!-f $scoresfile, !-f $sandboxfile);

sarun ("-L --lint", \&patterns_run_cb);
ok_all_patterns();