Remove Stopwords bug fixing
[koha.git] / t / db_dependent / Search.t
1 #!/usr/bin/perl
2 #
3 # This Koha test module is a stub!
4 # Add more tests here!!!
5
6 use strict;
7 use warnings;
8 use YAML;
9
10 use C4::Debug;
11 use C4::Context;
12 use C4::Search;
13
14 use Test::More tests => 3;
15
16 BEGIN {
17     use_ok('C4::Search');
18 }
19 foreach my $string ("Leçon","mod\xc3\xa8les"){
20 my @results=C4::Search::_remove_stopwords($string,"kw");
21 $debug && warn "$string ",Dump(@results);
22 ok($results[0] eq $string,"$string is not modified");
23 }
24 foreach my $string ("Les chaussettes de l'archiduchesse"){
25 my @results=C4::Search::_remove_stopwords($string,"kw");
26 $debug && warn "$string ",Dump(@results);
27 ok($results[0] ne $string,"$results[0] from $string");
28 }