Opened 7 years ago
Closed 6 years ago
#759 closed defect (fixed)
Test MSet::snippet() with small and zero length
Reported by: | Olly Betts | Owned by: | Vaibhav Kansagara |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.10 |
Component: | Test Suite | Version: | git master |
Severity: | normal | Keywords: | GoodFirstBug |
Cc: | vaibhavkansagara249@… | Blocked By: | |
Blocking: | Operating System: | All |
Description
We have a reasonable number of different tests of MSet::snippet()
in xapian-core/tests/api_snippets.cc
but none that tests what happens if the length is zero, or smaller than the length of any word in the text, or smaller than the omit
string.
Probably in such cases we should just return an empty snippet, but it would be good to check this happens (rather than an exception or undefined behaviour). The $truncate
feature in omega was buggy in such cases.
Change History (2)
comment:1 by , 6 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 6 years ago
Milestone: | 1.4.x → 1.4.10 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed by 1f99c7a12b2d4f8c9005ab3a6ea5105671cd9736 on git master and 5caf254fbee99c3d9fdb223e16292a194d6c84a5 on RELEASE/1.4 branch.