Opened 6 years ago

Closed 5 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 Vaibhav Kansagara, 5 years ago

Cc: vaibhavkansagara249@… added
Owner: changed from Olly Betts to Vaibhav Kansagara
Status: newassigned

comment:2 by Olly Betts, 5 years ago

Milestone: 1.4.x1.4.10
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.