You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2018/07/03 22:20:19 UTC

svn commit: r1835030 - in /spamassassin: branches/3.4/t/dnsbl_subtests.t trunk/t/dnsbl_subtests.t

Author: gbechis
Date: Tue Jul  3 22:20:19 2018
New Revision: 1835030

URL: http://svn.apache.org/viewvc?rev=1835030&view=rev
Log:
make it work even if SA is not installed

Modified:
    spamassassin/branches/3.4/t/dnsbl_subtests.t
    spamassassin/trunk/t/dnsbl_subtests.t

Modified: spamassassin/branches/3.4/t/dnsbl_subtests.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/dnsbl_subtests.t?rev=1835030&r1=1835029&r2=1835030&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/dnsbl_subtests.t (original)
+++ spamassassin/branches/3.4/t/dnsbl_subtests.t Tue Jul  3 22:20:19 2018
@@ -12,6 +12,16 @@ use SATest; sa_t_init("dnsbl_subtests");
 use vars qw(%patterns %anti_patterns);
 use Test::More tests => 46;
 
+BEGIN {
+  if (-e 't/test_dir') { # if we are running "t/rule_tests.t", kluge around ...
+    chdir 't';
+  }
+
+  if (-e 'test_dir') {            # running from test directory, not ..
+    unshift(@INC, '../blib/lib');
+  }
+}
+
 my $prefix = '.';
 if (-e 'test_dir') {            # running from test directory, not ..
   $prefix = '..';

Modified: spamassassin/trunk/t/dnsbl_subtests.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/dnsbl_subtests.t?rev=1835030&r1=1835029&r2=1835030&view=diff
==============================================================================
--- spamassassin/trunk/t/dnsbl_subtests.t (original)
+++ spamassassin/trunk/t/dnsbl_subtests.t Tue Jul  3 22:20:19 2018
@@ -12,6 +12,16 @@ use SATest; sa_t_init("dnsbl_subtests");
 use vars qw(%patterns %anti_patterns);
 use Test::More tests => 46;
 
+BEGIN {
+  if (-e 't/test_dir') { # if we are running "t/rule_tests.t", kluge around ...
+    chdir 't';
+  }
+
+  if (-e 'test_dir') {            # running from test directory, not ..
+    unshift(@INC, '../blib/lib');
+  }
+}
+
 my $prefix = '.';
 if (-e 'test_dir') {            # running from test directory, not ..
   $prefix = '..';