Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
3f40ba04
You need to sign in or sign up before continuing.
Commit
3f40ba04
authored
Jul 08, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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)
parent
38728c2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
10 deletions
+30
-10
Search.pm
xt/lib/Bugzilla/Test/Search.pm
+4
-3
Constants.pm
xt/lib/Bugzilla/Test/Search/Constants.pm
+22
-7
FieldTest.pm
xt/lib/Bugzilla/Test/Search/FieldTest.pm
+4
-0
No files found.
xt/lib/Bugzilla/Test/Search.pm
View file @
3f40ba04
...
...
@@ -604,12 +604,12 @@ sub _create_one_bug {
# All the bugs are created with everconfirmed = 0.
$params
{
bug_status
}
=
'UNCONFIRMED'
;
my
$bug
=
Bugzilla::
Bug
->
create
(
\%
params
);
# These are necessary for the changedfrom tests.
my
$extra_values
=
$self
->
_extra_bug_create_values
->
{
$number
};
foreach
my
$field
qw(comments remaining_time
flags
percentage_complete
foreach
my
$field
qw(comments remaining_time percentage_complete
keyword_objects everconfirmed dependson blocked
groups_in)
groups_in
classification
)
{
$extra_values
->
{
$field
}
=
$bug
->
$field
;
}
...
...
@@ -705,6 +705,7 @@ sub _create_one_bug {
$bug
->
set_flags
(
[]
,
$flags
);
$timestamp
->
set
(
second
=>
$number
);
$bug
->
update
(
$timestamp
->
ymd
.
' '
.
$timestamp
->
hms
);
$extra_values
->
{
flags
}
=
$bug
->
flags
;
# It's not generally safe to do update() multiple times on
# the same Bug object.
...
...
xt/lib/Bugzilla/Test/Search/Constants.pm
View file @
3f40ba04
...
...
@@ -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
=>
[]
},
},
},
],
...
...
xt/lib/Bugzilla/Test/Search/FieldTest.pm
View file @
3f40ba04
...
...
@@ -406,6 +406,10 @@ sub _translate_value {
foreach
my
$number
(
1
..
NUM_BUGS
)
{
$value
=
$self
->
_translate_value_for_bug
(
$number
,
$value
);
}
# Sanity check to make sure that none of the <> stuff was left in.
if
(
$value
=~
/<\d/
)
{
die
$self
->
name
.
": value untranslated: $value\n"
;
}
return
$value
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment