You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/07/25 20:10:33 UTC

svn commit: r559545 - in /spamassassin/trunk: MANIFEST build/README t/root_spamd_u.t

Author: jm
Date: Wed Jul 25 11:10:32 2007
New Revision: 559545

URL: http://svn.apache.org/viewvc?view=rev&rev=559545
Log:
add test case for bug 5574, t/root_spamd_u.t

Added:
    spamassassin/trunk/t/root_spamd_u.t   (with props)
Modified:
    spamassassin/trunk/MANIFEST
    spamassassin/trunk/build/README

Modified: spamassassin/trunk/MANIFEST
URL: http://svn.apache.org/viewvc/spamassassin/trunk/MANIFEST?view=diff&rev=559545&r1=559544&r2=559545
==============================================================================
--- spamassassin/trunk/MANIFEST (original)
+++ spamassassin/trunk/MANIFEST Wed Jul 25 11:10:32 2007
@@ -504,3 +504,4 @@
 t/root_spamd_x_u.t
 t/spamc_x_E_R.t
 t/spamc_x_e.t
+t/root_spamd_u.t

Modified: spamassassin/trunk/build/README
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/README?view=diff&rev=559545&r1=559544&r2=559545
==============================================================================
--- spamassassin/trunk/build/README (original)
+++ spamassassin/trunk/build/README Wed Jul 25 11:10:32 2007
@@ -394,4 +394,8 @@
 - Approve the posting to the announce list (the list admins will get a
   mail indicating how to do this.)
 
+- Add the new version to the Bugzilla versions list:
+
+        http://issues.apache.org/SpamAssassin/editversions.cgi?product=Spamassassin&action=add
+
 // vim:tw=74:

Added: spamassassin/trunk/t/root_spamd_u.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_u.t?view=auto&rev=559545
==============================================================================
--- spamassassin/trunk/t/root_spamd_u.t (added)
+++ spamassassin/trunk/t/root_spamd_u.t Wed Jul 25 11:10:32 2007
@@ -0,0 +1,42 @@
+#!/usr/bin/perl
+
+# run with:   sudo prove -v t/root_spamd*
+
+use lib '.'; use lib 't';
+use SATest; sa_t_init("root_spamd_u");
+use Test;
+
+use constant TEST_ENABLED => conf_bool('run_root_tests');
+use constant IS_ROOT => eval { ($> == 0); };
+use constant RUN_TESTS => (TEST_ENABLED && IS_ROOT);
+
+BEGIN { plan tests => (RUN_TESTS ? 14 : 0) };
+exit unless RUN_TESTS;
+
+# ---------------------------------------------------------------------------
+
+%patterns = (
+
+q{ Return-Path: sb55sb55@yahoo.com}, 'firstline',
+q{ Subject: There yours for FREE!}, 'subj',
+q{ X-Spam-Status: Yes, score=}, 'status',
+q{ X-Spam-Flag: YES}, 'flag',
+q{ X-Spam-Level: **********}, 'stars',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',
+q{ This must be the very last line}, 'lastline',
+
+);
+
+# run spamc as unpriv uid
+$spamc = "sudo -u nobody $spamc";
+
+ok(start_spamd("-L -u nobody"));
+
+$SIG{ALRM} = sub { die "timed out"; };
+alarm 10;
+ok(spamcrun("< data/spam/001", \&patterns_run_cb));
+alarm 0;
+ok_all_patterns();
+
+ok(stop_spamd());

Propchange: spamassassin/trunk/t/root_spamd_u.t
------------------------------------------------------------------------------
    svn:executable = *