mirror of https://github.com/kiwix/libkiwix.git
Workaround for Packages/build-deb CI failures
Packages/build-deb CI flows failed on ubuntu-bionic and ubuntu-focal with the following mismatch in the ServerTest.suggestions unit-test: ``` [ RUN ] ServerTest.suggestions ../test/server.cpp:715: Failure Expected equality of these values: r->body Which is: ... removeEOLWhitespaceMarkers(expectedResponse) Which is: ... With diff: @@ -2,5 +2,5 @@ { \"value\" : \"Ray (movie)\", - \"label\" : \"Ray (<b>movie</b>...\", + \"label\" : \"Ray (<b>movie</b>)\", \"kind\" : \"path\" , \"path\" : \"A/Ray_(movie)\" Test context: url: /ROOT/suggest?content=zimfile&term=movie ``` For some reason (probably, a bug), the implementation of `Xapian::MSet::snippet()` on those platforms decided that a single closing parenthesis is more than is appropriate for inclusion in the snippet and replaced it with a (longer) ellipsis. Taking advantage of the necessity to work around that bug, the ServerTest.suggestions's functional coverage was enhanced - the problematic test point was replaced with a new one using a phrase instead of a single term.
This commit is contained in:
parent
9a6aef4dba
commit
c782cc718a
|
@ -664,17 +664,17 @@ R"EXPECTEDRESPONSE([
|
|||
]
|
||||
)EXPECTEDRESPONSE"
|
||||
},
|
||||
{ /* url: */ "/ROOT/suggest?content=zimfile&term=movie",
|
||||
{ /* url: */ "/ROOT/suggest?content=zimfile&term=old%20sun",
|
||||
R"EXPECTEDRESPONSE([
|
||||
{
|
||||
"value" : "Ray (movie)",
|
||||
"label" : "Ray (<b>movie</b>)",
|
||||
"value" : "That Lucky Old Sun",
|
||||
"label" : "That Lucky <b>Old</b> <b>Sun</b>",
|
||||
"kind" : "path"
|
||||
, "path" : "A/Ray_(movie)"
|
||||
, "path" : "A/That_Lucky_Old_Sun"
|
||||
},
|
||||
{
|
||||
"value" : "movie ",
|
||||
"label" : "containing 'movie'...",
|
||||
"value" : "old sun ",
|
||||
"label" : "containing 'old sun'...",
|
||||
"kind" : "pattern"
|
||||
//EOLWHITESPACEMARKER
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue