Merge remote-tracking branch 'origin/new/bug_5327'
[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 utf8;
9
10 use YAML;
11
12 use C4::Debug;
13 use C4::Context;
14 use C4::Search;
15
16 use Test::More tests => 4;
17
18 use_ok('C4::Search');
19
20 foreach my $string ("Leçon","modèles") {
21     my @results=C4::Search::_remove_stopwords($string,"kw");
22     $debug && warn "$string ",Dump(@results);
23     ok($results[0] eq $string,"$string is not modified");
24 }
25
26 foreach my $string ("A book about the stars") {
27     my @results=C4::Search::_remove_stopwords($string,"kw");
28     $debug && warn "$string ",Dump(@results);
29     ok($results[0] ne $string,"$results[0] from $string");
30 }