You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/07/19 02:05:52 UTC

svn commit: r423299 - in /spamassassin/branches/3.1: MANIFEST lib/Mail/SpamAssassin.pm t/lint_nocreate_prefs.t

Author: felicity
Date: Tue Jul 18 17:05:52 2006
New Revision: 423299

URL: http://svn.apache.org/viewvc?rev=423299&view=rev
Log:
bug 4690: spamassassin --lint implies -x (don't create user_prefs file)

Added:
    spamassassin/branches/3.1/t/lint_nocreate_prefs.t   (with props)
Modified:
    spamassassin/branches/3.1/MANIFEST
    spamassassin/branches/3.1/lib/Mail/SpamAssassin.pm

Modified: spamassassin/branches/3.1/MANIFEST
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/MANIFEST?rev=423299&r1=423298&r2=423299&view=diff
==============================================================================
--- spamassassin/branches/3.1/MANIFEST (original)
+++ spamassassin/branches/3.1/MANIFEST Tue Jul 18 17:05:52 2006
@@ -388,6 +388,7 @@
 t/ip_addrs.t
 t/lang_lint.t
 t/lang_pl_tests.t
+t/lint_nocreate_prefs.t
 t/memory_cycles.t
 t/meta.t
 t/metadata.t

Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/lib/Mail/SpamAssassin.pm?rev=423299&r1=423298&r2=423299&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin.pm Tue Jul 18 17:05:52 2006
@@ -1235,8 +1235,13 @@
   $self->{lint_rules} = $self->{conf}->{lint_rules} = 1;
   $self->{syntax_errors} = 0;
 
+  my $olddcp = $self->{dont_copy_prefs};
+  $self->{dont_copy_prefs} = 1;
+
   $self->init(1);
   $self->{syntax_errors} += $self->{conf}->{errors};
+
+  $self->{dont_copy_prefs} = $olddcp;       # revert back to previous
 
   my $mail = $self->parse(\@testmsg, 1);
   my $status = Mail::SpamAssassin::PerMsgStatus->new($self, $mail,

Added: spamassassin/branches/3.1/t/lint_nocreate_prefs.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/t/lint_nocreate_prefs.t?rev=423299&view=auto
==============================================================================
--- spamassassin/branches/3.1/t/lint_nocreate_prefs.t (added)
+++ spamassassin/branches/3.1/t/lint_nocreate_prefs.t Tue Jul 18 17:05:52 2006
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+use lib '.'; use lib 't';
+use SATest; sa_t_init("lint_nocreate_prefs");
+use Test; BEGIN { plan tests => 2 };
+
+# ---------------------------------------------------------------------------
+
+%patterns = ( q{  }, 'anything' );
+
+# override locale for this test!
+$ENV{'LC_ALL'} = 'C';
+
+sarun ("-L --lint --prefspath=log/prefs", \&patterns_run_cb);
+ok_all_patterns();
+
+ok (!-f "log/prefs");
+

Propchange: spamassassin/branches/3.1/t/lint_nocreate_prefs.t
------------------------------------------------------------------------------
    svn:executable = *