projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 33362 - fixed discount_mixin to not throw perl error when trying to discount...
[freeside.git]
/
rt
/
t
/
fts
/
indexed_pg.t
diff --git
a/rt/t/fts/indexed_pg.t
b/rt/t/fts/indexed_pg.t
index
c437c1f
..
88e35ab
100644
(file)
--- a/
rt/t/fts/indexed_pg.t
+++ b/
rt/t/fts/indexed_pg.t
@@
-1,4
+1,3
@@
-#!/usr/bin/perl -w
use strict;
use warnings;
use strict;
use warnings;
@@
-10,8
+9,6
@@
my ($major, $minor) = $RT::Handle->dbh->get_info(18) =~ /^0*(\d+)\.0*(\d+)/;
plan skip_all => "Need Pg 8.2 or higher; we have $major.$minor"
if "$major.$minor" < 8.2;
plan skip_all => "Need Pg 8.2 or higher; we have $major.$minor"
if "$major.$minor" < 8.2;
-plan tests => 36;
-
RT->Config->Set( FullTextSearch => Enable => 1, Indexed => 1, Column => 'ContentIndex', Table => 'Attachments' );
setup_indexing();
RT->Config->Set( FullTextSearch => Enable => 1, Indexed => 1, Column => 'ContentIndex', Table => 'Attachments' );
setup_indexing();
@@
-71,10
+68,11
@@
sub run_test {
diag "Wrong SQL query for '$query':". $tix->BuildSelectQuery if $error;
}
diag "Wrong SQL query for '$query':". $tix->BuildSelectQuery if $error;
}
+my $blase = Encode::decode_utf8("blasé");
@tickets = RT::Test->create_tickets(
{ Queue => $q->id },
@tickets = RT::Test->create_tickets(
{ Queue => $q->id },
- { Subject => 'fts test 1', Content =>
'book'
},
- { Subject => 'fts test 2', Content =>
'bars
' },
+ { Subject => 'fts test 1', Content =>
"book $blase"
},
+ { Subject => 'fts test 2', Content =>
"bars blasé", ContentType => 'text/html
' },
);
sync_index();
);
sync_index();
@@
-85,6
+83,11
@@
run_tests(
"Content LIKE 'book'" => { $book->id => 1, $bars->id => 0 },
"Content LIKE 'bars'" => { $book->id => 0, $bars->id => 1 },
"Content LIKE 'book'" => { $book->id => 1, $bars->id => 0 },
"Content LIKE 'bars'" => { $book->id => 0, $bars->id => 1 },
+ # Unicode searching
+ "Content LIKE '$blase'" => { $book->id => 1, $bars->id => 1 },
+ "Content LIKE 'blase'" => { $book->id => 0, $bars->id => 0 },
+ "Content LIKE 'blas'" => { $book->id => 0, $bars->id => 0 },
+
# make sure that Pg stemming works
"Content LIKE 'books'" => { $book->id => 1, $bars->id => 0 },
"Content LIKE 'bar'" => { $book->id => 0, $bars->id => 1 },
# make sure that Pg stemming works
"Content LIKE 'books'" => { $book->id => 1, $bars->id => 0 },
"Content LIKE 'bar'" => { $book->id => 0, $bars->id => 1 },
@@
-117,3
+120,5
@@
run_tests(
);
@tickets = ();
);
@tickets = ();
+
+done_testing;