You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2013/01/09 21:02:28 UTC
svn commit: r1431037 - /spamassassin/trunk/t/SATest.pm
Author: kmcgrail
Date: Wed Jan 9 20:02:27 2013
New Revision: 1431037
URL: http://svn.apache.org/viewvc?rev=1431037&view=rev
Log:
Added the ability to override more than one variable
Modified:
spamassassin/trunk/t/SATest.pm
Modified: spamassassin/trunk/t/SATest.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/SATest.pm?rev=1431037&r1=1431036&r2=1431037&view=diff
==============================================================================
--- spamassassin/trunk/t/SATest.pm (original)
+++ spamassassin/trunk/t/SATest.pm Wed Jan 9 20:02:27 2013
@@ -842,7 +842,25 @@ sub read_config {
shift @ARGV;
my $k = shift @ARGV;
my $v = shift @ARGV;
- $conf{$k} = $v;
+
+ # Override only allows setting one variable. Some xt tests need to set more
+ # config variables. Adding : as a delimeter for config variable and value
+ # parameters
+
+ @k = split (/:/,$k);
+ @v = split (/:/,$v);
+
+ if (scalar(@k) != scalar(@v)) {
+ print "Error: The number of override arguments for variables and values did not match\n!";
+ exit;
+ } else {
+ print "\nProcessing Overrides:\n\n";
+ }
+
+ for (my $i = 0; $i < scalar(@k); $i++) {
+ $conf{$k[$i]} = $v[$i];
+ print "Overriding $k[$i] with value $v[$i]\n";
+ }
}
close CF;
}