From 3f40ba04a7bdea2f3f84202006cc55054d647afb Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Thu, 8 Jul 2010 18:47:39 -0700 Subject: Bug 577588: xt/seach.t was sometimes not properly translating special <> values into the actual bug value, for searching r=mkanat, a=mkanat (module owner) --- xt/lib/Bugzilla/Test/Search/Constants.pm | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 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 4a287eeb3..bc33ad335 100644 --- a/xt/lib/Bugzilla/Test/Search/Constants.pm +++ b/xt/lib/Bugzilla/Test/Search/Constants.pm @@ -449,9 +449,9 @@ use constant KNOWN_BROKEN => { CHANGED_VALUE_BROKEN, # All fields should have a way to search for "changing # from a blank value" probably. - blocked => { contains => [1] }, - dependson => { contains => [1] }, - FIELD_TYPE_BUG_ID, { contains => [1] }, + blocked => { contains => [3,4,5] }, + dependson => { contains => [2,4,5] }, + FIELD_TYPE_BUG_ID, { contains => [5] }, }, # changeto doesn't find work_time changes (probably due to decimal/string # stuff). Same for remaining_time and estimated_time. @@ -748,7 +748,7 @@ use constant TESTS => { reporter_accessible => { value => 1, contains => [1] }, 'longdescs.isprivate' => { value => 1, contains => [1] }, everconfirmed => { value => 1, contains => [1] }, - dependson => { contains => [1,3] }, + dependson => { value => '<3>', contains => [1,3] }, blocked => { contains => [1,2] }, GREATERTHAN_OVERRIDE, } @@ -771,7 +771,11 @@ use constant TESTS => { allwordssubstr => [ { contains => [1], value => '<1>', override => { MULTI_BOOLEAN_OVERRIDE } }, - { contains => [], value => '<1>,<2>' }, + { contains => [], value => '<1>,<2>', + override => { + dependson => { value => '<1-id> <3-id>', contains => [] }, + } + }, ], nowordssubstr => [ { contains => [2,3,4,5], value => '<1>', @@ -804,7 +808,11 @@ use constant TESTS => { allwords => [ { contains => [1], value => '<1>', override => { MULTI_BOOLEAN_OVERRIDE } }, - { contains => [], value => '<1> <2>' }, + { contains => [], value => '<1> <2>', + override => { + dependson => { contains => [], value => '<2-id> <3-id>' } + } + }, ], nowords => [ { contains => [2,3,4,5], value => '<1>', @@ -844,18 +852,25 @@ use constant TESTS => { # in the bugs_activity table, so they won't ever match. blocked => { contains => [] }, dependson => { contains => [] }, - } + } }, ], changedfrom => [ { contains => [1], value => '<1>', override => { CHANGED_OVERRIDE, + # The test never changes an already-set dependency field, but + # we *can* attempt to test searching against an empty value, + # which should get us some bugs. + blocked => { value => '', contains => [1,2] }, + dependson => { value => '', contains => [1,3] }, + FIELD_TYPE_BUG_ID, { value => '', contains => [1,2,3,4] }, # longdesc changedfrom doesn't make any sense. longdesc => { contains => [] }, # Nor does creation_ts changedfrom. creation_ts => { contains => [] }, 'attach_data.thedata' => { contains => [] }, + bug_id => { value => '<1-id>', contains => [] }, }, }, ], -- cgit v1.2.3-24-g4f1b