From 6280631a13707d1c2190ff5bc328c61994912eba Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Jan 09 2012 21:25:12 +0000 Subject: Add spamassassin tests. --- diff --git a/tests/p_spamassassin/0-install_spamassassin.sh b/tests/p_spamassassin/0-install_spamassassin.sh new file mode 100755 index 0000000..8338751 --- /dev/null +++ b/tests/p_spamassassin/0-install_spamassassin.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +t_InstallPackage spamassassin + diff --git a/tests/p_spamassassin/spamassassin_test.sh b/tests/p_spamassassin/spamassassin_test.sh new file mode 100755 index 0000000..f733bec --- /dev/null +++ b/tests/p_spamassassin/spamassassin_test.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - check that spamassassin can detect spam." + +VERSION=`t_GetPkgVer spamassassin` +spamassassin --lint &&\ +spamassassin < /usr/share/doc/spamassassin-${VERSION}/sample-spam.txt | grep -q 'X-Spam-Flag: YES' + +t_CheckExitStatus $?