fix test plan and false test errors in Search.t
authorGalen Charlton <gmcharlt@gmail.com>
Wed, 6 Oct 2010 13:51:55 +0000 (09:51 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 6 Oct 2010 13:51:55 +0000 (09:51 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
t/db_dependent/Search.t

index 00d5b7c..31316f2 100644 (file)
@@ -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");
 }