From 0fcceb470f771931f90415dd019052f7032a17da Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 21 May 2013 01:55:05 +0800 Subject: Bug 828344: "contains all of the words" no longer looks for all words within the same comment or flag r=LpSolit, a=LpSolit --- xt/lib/Bugzilla/Test/Search/Constants.pm | 83 ++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 9 deletions(-) (limited to 'xt/lib/Bugzilla/Test/Search/Constants.pm') diff --git a/xt/lib/Bugzilla/Test/Search/Constants.pm b/xt/lib/Bugzilla/Test/Search/Constants.pm index 53837ba58..79b1b72f4 100644 --- a/xt/lib/Bugzilla/Test/Search/Constants.pm +++ b/xt/lib/Bugzilla/Test/Search/Constants.pm @@ -183,11 +183,14 @@ use constant GREATERTHAN_BROKEN => ( ); # allwords and allwordssubstr have these broken tests in common. -# -# allwordssubstr on cc fields matches against a single cc, -# instead of matching against all ccs on a bug. use constant ALLWORDS_BROKEN => ( + # allwordssubstr on cc fields matches against a single cc, + # instead of matching against all ccs on a bug. cc => { contains => [1] }, + # bug 828344 changed how these searches operate to revert back to the 4.0 + # behavour, so these tests need to be updated (bug 849117). + 'flagtypes.name' => { contains => [1] }, + longdesc => { contains => [1] }, ); # Fields that don't generally work at all with changed* searches, but @@ -312,6 +315,24 @@ use constant KNOWN_BROKEN => { # This should probably search the reporter. creation_ts => { contains => [1] }, }, + notequals => { + 'flagtypes.name' => { contains => [1, 5] }, + longdesc => { contains => [1] }, + }, + notregexp => { + 'flagtypes.name' => { contains => [1, 5] }, + longdesc => { contains => [1] }, + }, + notsubstring => { + 'flagtypes.name' => { contains => [5] }, + longdesc => { contains => [1] }, + }, + nowords => { + 'flagtypes.name' => { contains => [1, 5] }, + }, + nowordssubstr => { + 'flagtypes.name' => { contains => [5] }, + }, }; ################### @@ -342,17 +363,34 @@ use constant CHANGED_FROM_TO_BROKEN_NOT => ( # These are field/operator combinations that are broken when run under NOT(). use constant BROKEN_NOT => { - allwords => { - cc => { contains => [1] }, + allwords => { + cc => { contains => [1] }, + 'flagtypes.name' => { contains => [1, 5] }, + longdesc => { contains => [1] }, }, 'allwords-<1> <2>' => { cc => { }, }, allwordssubstr => { - cc => { contains => [1] }, + cc => { contains => [1] }, + 'flagtypes.name' => { contains => [5, 6] }, + longdesc => { contains => [1] }, }, 'allwordssubstr-<1>,<2>' => { - cc => { }, + cc => { }, + longdesc => { contains => [1] }, + }, + anyexact => { + 'flagtypes.name' => { contains => [1, 2, 5] }, + }, + anywords => { + 'flagtypes.name' => { contains => [1, 2, 5] }, + }, + anywordssubstr => { + 'flagtypes.name' => { contains => [5] }, + }, + casesubstring => { + 'flagtypes.name' => { contains => [5] }, }, changedafter => { "attach_data.thedata" => { contains => [2, 3, 4] }, @@ -379,7 +417,6 @@ use constant BROKEN_NOT => { dependson => { contains => [1, 3] }, work_time => { contains => [1] }, FIELD_TYPE_BUG_ID, { contains => [1 .. 4] }, - }, changedto => { CHANGED_BROKEN_NOT, @@ -388,10 +425,38 @@ use constant BROKEN_NOT => { "remaining_time" => { contains => [1] }, }, greaterthan => { - cc => { contains => [1] }, + cc => { contains => [1] }, + 'flagtypes.name' => { contains => [5] }, }, greaterthaneq => { cc => { contains => [1] }, + 'flagtypes.name' => { contains => [2, 5] }, + }, + equals => { + 'flagtypes.name' => { contains => [1, 5] }, + }, + notequals => { + longdesc => { contains => [1] }, + }, + notregexp => { + longdesc => { contains => [1] }, + }, + notsubstring => { + longdesc => { contains => [1] }, + }, + lessthan => { + 'flagtypes.name' => { contains => [5] }, + }, + lessthaneq => { + 'flagtypes.name' => { contains => [1, 5] }, + }, + regexp => { + 'flagtypes.name' => { contains => [1, 5] }, + longdesc => { contains => [1] }, + }, + substring => { + 'flagtypes.name' => { contains => [5] }, + longdesc => { contains => [1] }, }, }; -- cgit v1.2.3-24-g4f1b