From: Max Kanat-Alexander Date: Sat, 2 Oct 2010 19:45:23 +0000 (-0700) Subject: Change the way that the xt/search.t injection tests look for known broken X-Git-Tag: bugzilla-4.1.1~247 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38230573e91978fcf0b5a768ca7aa9ec121ab1cc;p=thirdparty%2Fbugzilla.git Change the way that the xt/search.t injection tests look for known broken tests, so that the Pg tests properly understand that they can't test creation_ts changedafter or changedbefore, *ever*. https://bugzilla.mozilla.org/show_bug.cgi?id=600496 --- diff --git a/xt/lib/Bugzilla/Test/Search/InjectionTest.pm b/xt/lib/Bugzilla/Test/Search/InjectionTest.pm index 1ee83c57c7..1bd9fd82c6 100644 --- a/xt/lib/Bugzilla/Test/Search/InjectionTest.pm +++ b/xt/lib/Bugzilla/Test/Search/InjectionTest.pm @@ -37,15 +37,14 @@ sub _known_broken { # We don't want to auto-vivify $operator_broken and thus make it true. my @field_ok = $operator_broken ? @{ $operator_broken->{field_ok} || [] } : (); - - return {} if grep { $_ eq $self->field } @field_ok; + $operator_broken = undef if grep { $_ eq $self->field } @field_ok; my $field_broken = INJECTION_BROKEN_FIELD->{$self->field} || INJECTION_BROKEN_FIELD->{$self->field_object->type}; # We don't want to auto-vivify $field_broken and thus make it true. my @operator_ok = $field_broken ? @{ $field_broken->{operator_ok} || [] } : (); - return {} if grep { $_ eq $self->operator } @operator_ok; + $field_broken = undef if grep { $_ eq $self->operator } @operator_ok; return $operator_broken || $field_broken || {}; }