From 58e2f6a99150d67c92841f8391adec353d65a814 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 6 Oct 2010 09:51:55 -0400 Subject: [PATCH] fix test plan and false test errors in Search.t Signed-off-by: Galen Charlton --- t/db_dependent/Search.t | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 00d5b7c84d..31316f2170 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"); } -- 2.20.1