View | Details | Raw Unified | Return to bug 7005
Collapse All | Expand All

(-)sa_compile.t.orig (-3 / +7 lines)
Lines 4-9 Link Here
4
$ENV{'TEST_PERL_TAINT'} = 'no';     # inhibit for this test
4
$ENV{'TEST_PERL_TAINT'} = 'no';     # inhibit for this test
5
use SATest; sa_t_init("sa_compile");
5
use SATest; sa_t_init("sa_compile");
6
use Test;
6
use Test;
7
use Config;
8
9
my $temp_binpath = $Config{sitebinexp};
10
$temp_binpath =~ s/^$Config{prefix}//;
7
11
8
# called from BEGIN
12
# called from BEGIN
9
sub re2c_version_new_enough {
13
sub re2c_version_new_enough {
Lines 113-119 Link Here
113
117
114
# we now have an "installed" version we can run sa-compile with.  Ensure
118
# we now have an "installed" version we can run sa-compile with.  Ensure
115
# sarun() will use it appropriately
119
# sarun() will use it appropriately
116
$scr = "$instdir/foo/bin/spamassassin";
120
$scr = "$instdir/foo/$temp_binpath/spamassassin";
117
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
121
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
118
122
119
set_rules q{
123
set_rules q{
Lines 135-148 Link Here
135
139
136
# -------------------------------------------------------------------
140
# -------------------------------------------------------------------
137
141
138
system_or_die "$instdir/foo/bin/sa-compile --keep-tmps";  # --debug
142
system_or_die "$instdir/foo/$temp_binpath/sa-compile --keep-tmps";  # --debug
139
%patterns = (
143
%patterns = (
140
144
141
  q{ able to use 1/1 'body_0' compiled rules }, 'able-to-use',
145
  q{ able to use 1/1 'body_0' compiled rules }, 'able-to-use',
142
  q{ check: tests=FOO }, 'FOO'
146
  q{ check: tests=FOO }, 'FOO'
143
147
144
);
148
);
145
$scr = "$instdir/foo/bin/spamassassin";
149
$scr = "$instdir/foo/$temp_binpath/spamassassin";
146
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
150
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
147
ok sarun ("-D -Lt < $cwd/data/spam/001 2>&1", \&patterns_run_cb);
151
ok sarun ("-D -Lt < $cwd/data/spam/001 2>&1", \&patterns_run_cb);
148
ok_all_patterns();
152
ok_all_patterns();

Return to bug 7005