[Koha-patches] [PATCH 2/4] fix test plan and false test errors in Search.t

Galen Charlton gmcharlt at gmail.com
Wed Oct 6 16:41:25 CEST 2010


Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 t/db_dependent/Search.t |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t
index 00d5b7c..31316f2 100644
--- a/t/db_dependent/Search.t
+++ b/t/db_dependent/Search.t
@@ -5,24 +5,26 @@
 
 use strict;
 use warnings;
+use utf8;
+
 use YAML;
 
 use C4::Debug;
 use C4::Context;
 use C4::Search;
 
-use Test::More tests => 3;
+use Test::More tests => 4;
 
-BEGIN {
-    use_ok('C4::Search');
-}
-foreach my $string ("Leçon","mod\xc3\xa8les"){
-my @results=C4::Search::_remove_stopwords($string,"kw");
-$debug && warn "$string ",Dump(@results);
-ok($results[0] eq $string,"$string is not modified");
+use_ok('C4::Search');
+
+foreach my $string ("Leçon","modèles") {
+    my @results=C4::Search::_remove_stopwords($string,"kw");
+    $debug && warn "$string ",Dump(@results);
+    ok($results[0] eq $string,"$string is not modified");
 }
-foreach my $string ("Les chaussettes de l'archiduchesse"){
-my @results=C4::Search::_remove_stopwords($string,"kw");
-$debug && warn "$string ",Dump(@results);
-ok($results[0] ne $string,"$results[0] from $string");
+
+foreach my $string ("Les chaussettes de l'archiduchesse") {
+    my @results=C4::Search::_remove_stopwords($string,"kw");
+    $debug && warn "$string ",Dump(@results);
+    ok($results[0] ne $string,"$results[0] from $string");
 }
-- 
1.7.0



More information about the Koha-patches mailing list