[mb-commits] r9725 - in mb_server/trunk: cgi-bin/MusicBrainz/Server t

root at musicbrainz.org root at musicbrainz.org
Sun Mar 9 08:45:06 UTC 2008


Author: luks
Date: 2008-03-09 08:45:06 +0000 (Sun, 09 Mar 2008)
New Revision: 9725

Added:
   mb_server/trunk/cgi-bin/MusicBrainz/Server/LuceneSearch.pm
   mb_server/trunk/t/runtests.pl
Modified:
   mb_server/trunk/cgi-bin/MusicBrainz/Server/Attribute.pm
   mb_server/trunk/t/replace_ar_attribs.t
   mb_server/trunk/t/taglookup_lucene_query.t
Log:
Add a simple test runner (and forgotten file from previous commit)

Modified: mb_server/trunk/cgi-bin/MusicBrainz/Server/Attribute.pm
===================================================================
--- mb_server/trunk/cgi-bin/MusicBrainz/Server/Attribute.pm	2008-03-09 08:34:11 UTC (rev 9724)
+++ mb_server/trunk/cgi-bin/MusicBrainz/Server/Attribute.pm	2008-03-09 08:45:06 UTC (rev 9725)
@@ -186,7 +186,7 @@
 	my ($phrase, $attrs) = @_;
 
 	my @result;
-	my @tokens = split /({.*?}\s*)/, $phrase;
+	my @tokens = split(/({.*?}\s*)/, $phrase);
 	my $is_tag = 0;
 
 	foreach my $token (@tokens) {
@@ -226,11 +226,11 @@
 			$token .= $space if $token;
 		}
 
-		push @result, $token;
+		push(@result, $token) if $token;
 		$is_tag = !$is_tag;
 	}
-	
-	return join "", @result;
+
+	return join("", @result);
 }
 
 sub Exists

Added: mb_server/trunk/cgi-bin/MusicBrainz/Server/LuceneSearch.pm


Property changes on: mb_server/trunk/cgi-bin/MusicBrainz/Server/LuceneSearch.pm
___________________________________________________________________
Name: svn:mime-type
   + text/x-perl
Name: svn:eol-style
   + native


Property changes on: mb_server/trunk/t/replace_ar_attribs.t
___________________________________________________________________
Name: svn:mime-type
   + text/x-perl
Name: svn:eol-style
   + native

Added: mb_server/trunk/t/runtests.pl


Property changes on: mb_server/trunk/t/runtests.pl
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/x-perl
Name: svn:eol-style
   + native


Property changes on: mb_server/trunk/t/taglookup_lucene_query.t
___________________________________________________________________
Name: svn:mime-type
   + text/x-perl
Name: svn:eol-style
   + native




More information about the MusicBrainz-commits mailing list