Add a new test, showing accents is not properly handle in search endpoint.

This commit is contained in:
Matthieu Gautier 2023-06-05 15:11:06 +02:00
parent 820ffa8134
commit 5f4dad60b9
1 changed files with 27 additions and 0 deletions

View File

@ -1456,6 +1456,33 @@ TEST(ServerSearchTest, searchResults)
{ "", 40, false },
}
},
// Be sure that searching with accented query return the same things than non accented query.
{
/* query */ "pattern=j%C3%A0zz"
"&books.filter.lang=eng"
"&books.filter.title=Ray%20Charles",
/* start */ -1,
/* resultsPerPage */ 5,
/* totalResultCount */ 44,
/* firstResultIndex */ 1,
/* results */ {
LARGE_SEARCH_RESULTS[0],
LARGE_SEARCH_RESULTS[1],
LARGE_SEARCH_RESULTS[2],
LARGE_SEARCH_RESULTS[3],
LARGE_SEARCH_RESULTS[4],
},
/* pagination */ {
{ "1", 0, true },
{ "2", 5, false },
{ "3", 10, false },
{ "4", 15, false },
{ "5", 20, false },
{ "", 40, false },
}
},
};
ZimFileServer zfs(SERVER_PORT, ZimFileServer::DEFAULT_OPTIONS,