[Xapian-tickets] [Xapian] #759: Test MSet::snippet() with small and zero length

Xapian nobody at xapian.org
Thu Apr 12 21:45:25 BST 2018


#759: Test MSet::snippet() with small and zero length
-------------------------------+--------------------------
        Reporter:  olly        |      Owner:  olly
            Type:  defect      |     Status:  new
        Priority:  normal      |  Milestone:  1.4.x
       Component:  Test Suite  |    Version:  git master
        Severity:  normal      |   Keywords:  GoodFirstBug
      Blocked By:              |   Blocking:
Operating System:  All         |
-------------------------------+--------------------------
 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 [ticket:754 buggy in
 such cases].

--
Ticket URL: <https://trac.xapian.org/ticket/759>
Xapian <https://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list