View | Details | Raw Unified | Return to bug 18336
Collapse All | Expand All

(-)a/t/db_dependent/www/auth_values_input_www.t (-3 / +4 lines)
Lines 49-55 elsif (not defined $intranet) { Link Here
49
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
49
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
50
}
50
}
51
else {
51
else {
52
    plan tests => 33;
52
    plan tests => 34;
53
}
53
}
54
54
55
my $dbh = C4::Context->dbh;
55
my $dbh = C4::Context->dbh;
Lines 71-79 $agent->field( 'branch', '' ); Link Here
71
$agent->click_ok( '', 'login to staff client' );
71
$agent->click_ok( '', 'login to staff client' );
72
$agent->get_ok( "$intranet/cgi-bin/koha/mainpage.pl", 'load main page' );
72
$agent->get_ok( "$intranet/cgi-bin/koha/mainpage.pl", 'load main page' );
73
73
74
#--------------------------------------------------- Test with corean and greek chars
74
#---------------------------------------- Test with corean, greek and emoji chars
75
75
76
$category = '学協会μμ';
76
$category = '学協会μμ😀';
77
$dbh->do(q|DELETE FROM authorised_values WHERE category = ?|, undef, $category);
77
$dbh->do(q|DELETE FROM authorised_values WHERE category = ?|, undef, $category);
78
$dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name = ?|, undef, $category);
78
$dbh->do(q|DELETE FROM authorised_value_categories WHERE category_name = ?|, undef, $category);
79
79
Lines 123-128 my $text = $agent->text() ; Link Here
123
ok ( ( length(Encode::encode('UTF-8', $text)) != length($text) ) , 'UTF-8 are multi-byte. Good') ;
123
ok ( ( length(Encode::encode('UTF-8', $text)) != length($text) ) , 'UTF-8 are multi-byte. Good') ;
124
ok ($text =~  m/学協会μμ/, 'UTF-8 (Asia) chars are correctly present. Good');
124
ok ($text =~  m/学協会μμ/, 'UTF-8 (Asia) chars are correctly present. Good');
125
ok ($text =~  m/επιμεq/, 'UTF-8 (Greek) chars are correctly present. Good');
125
ok ($text =~  m/επιμεq/, 'UTF-8 (Greek) chars are correctly present. Good');
126
ok ($text =~  m/😀/, 'UTF-8 (emoji) chars are correctly present. Good');
126
my @links = $agent->links;
127
my @links = $agent->links;
127
my $id_to_del ='';
128
my $id_to_del ='';
128
$delete_re = q|op=delete\&searchfield=| . uri_escape_utf8($category) . '\&id=(\d+)';
129
$delete_re = q|op=delete\&searchfield=| . uri_escape_utf8($category) . '\&id=(\d+)';
(-)a/t/db_dependent/www/data/marc21utf8supprec.mrc (+1 lines)
Line 0 Link Here
1
00219cam a2200097 a 4500001000800000005001700008008004100025245002500066260002100091650000900112100880920140204215200.0140204m2005    gr a          001 0 gre d02aA tiny record (😀)  a𠻺tomasito𠻺 4a😀00219cam a2200097 a 4500001000800000005001700008008004100025245002500066260002100091650000900112100880920140204215200.0140204m2005    gr a          001 0 gre d02aA tiny record (😀)  a𠻺tomasito𠻺 4a😀
(-)a/t/db_dependent/www/data/unimarcutf8supprec.mrc (+1 lines)
Line 0 Link Here
1
00650nam0a22002293i 4500001000200000005001700002071002100019090000600040100004100046101000800087200002500095210004300120215002400163600002000187601002000207606000900227702004700236702005200283710005500335801002300390942000700413220141116143328.0  b𠻺tomasito𠻺  a2  a20130409d2005    ||||0itay50      ba  aita1 aA tiny record (😀)  aAthinacEvraico Mouseio Ellathosd2005  a73 p.cill.d27 cm.  2学協会. μμ  2学協会. μμ  2😀 1aMenexiadisb, Alexios3IT\ICCU\LO1V\404551 1aAndrianopouloub, Panayota3IT\ICCU\LO1V\40455202aEvraico Mouseio Ellathos3IT\ICCU\LO1V\4045534070 3aITbICCUc20141104  cBK00650nam0a22002293i 4500001000200000005001700002071002100019090000600040100004100046101000800087200002500095210004300120215002400163600002000187601002000207606000900227702004700236702005200283710005500335801002300390942000700413320141116143328.0  b𠻺tomasito𠻺  a2  a20130409d2005    ||||0itay50      ba  aita1 aA tiny record (😀)  aAthinacEvraico Mouseio Ellathosd2005  a73 p.cill.d27 cm.  2学協会. μμ  2学協会. μμ  2😀 1aMenexiadisb, Alexios3IT\ICCU\LO1V\404551 1aAndrianopouloub, Panayota3IT\ICCU\LO1V\40455202aEvraico Mouseio Ellathos3IT\ICCU\LO1V\4045534070 3aITbICCUc20141104  cBK
(-)a/t/db_dependent/www/search_utf8.t (-2 / +17 lines)
Lines 55-60 my $file2 = Link Here
55
  ? "$testdir/data/unimarclatin1utf8rec.mrc"
55
  ? "$testdir/data/unimarclatin1utf8rec.mrc"
56
  : "$testdir/data/marc21latin1utf8rec.mrc";
56
  : "$testdir/data/marc21latin1utf8rec.mrc";
57
57
58
my $file3 =
59
  $marcflavour eq 'UNIMARC'
60
  ? "$testdir/data/unimarcutf8supprec.mrc"
61
  : "$testdir/data/marc21utf8supprec.mrc";
62
58
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
63
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
59
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
64
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
60
my $intranet = $ENV{KOHA_INTRANET_URL};
65
my $intranet = $ENV{KOHA_INTRANET_URL};
Lines 70-76 elsif ( not defined $opac ) { Link Here
70
   plan skip_all => "Tests skip. You must set env. variable KOHA_OPAC_URL to do tests\n";
75
   plan skip_all => "Tests skip. You must set env. variable KOHA_OPAC_URL to do tests\n";
71
}
76
}
72
else {
77
else {
73
    plan tests => 66;
78
    plan tests => 99;
74
}
79
}
75
80
76
$intranet =~ s#/$##;
81
$intranet =~ s#/$##;
Lines 104-109 if ( not defined $indexer_pid ) { Link Here
104
my $utf8_reg2 = qr/Tòmas/;
109
my $utf8_reg2 = qr/Tòmas/;
105
test_search($file2,'Ramòn', 'Tòmas',$utf8_reg2);
110
test_search($file2,'Ramòn', 'Tòmas',$utf8_reg2);
106
111
112
#--------------------------------- Test with supplementary utf-8 chars;
113
launch_zebra( $datadir, $koha_conf );
114
if ( not defined $zebra_pid ) {
115
    plan skip_all => "Tests skip. Error starting Zebra Server to do those tests\n";
116
}
117
launch_indexer( );
118
if ( not defined $indexer_pid ) {
119
    plan skip_all => "Tests skip. Error starting the indexer daemon to do those tests\n";
120
}
121
my $utf8_reg3 = qr/😀/;
122
test_search($file3, "𠻺tomasito𠻺", 'A tiny record', $utf8_reg3);
107
123
108
sub test_search{
124
sub test_search{
109
    #Params
125
    #Params
110
- 

Return to bug 18336