mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Also add test without diacritics removal
This commit is contained in:
parent
bbee5b0acb
commit
ae25a1f425
@ -108,7 +108,7 @@ private:
|
|||||||
int send_token(const icu::UnicodeString &token, int32_t start_offset, int32_t end_offset, int flags = 0) {
|
int send_token(const icu::UnicodeString &token, int32_t start_offset, int32_t end_offset, int flags = 0) {
|
||||||
token_buf.clear(); token_buf.reserve(4 * token.length());
|
token_buf.clear(); token_buf.reserve(4 * token.length());
|
||||||
token.toUTF8String(token_buf);
|
token.toUTF8String(token_buf);
|
||||||
return current_callback(current_callback_ctx, flags, token_buf.c_str(), token_buf.size(), byte_offsets[start_offset], byte_offsets[end_offset]);
|
return current_callback(current_callback_ctx, flags, token_buf.c_str(), (int)token_buf.size(), byte_offsets[start_offset], byte_offsets[end_offset]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -50,4 +50,7 @@ class FTSTest(BaseTest):
|
|||||||
conn = TestConn()
|
conn = TestConn()
|
||||||
conn.insert_text('coộl')
|
conn.insert_text('coộl')
|
||||||
self.ae(conn.term_row_counts(), {'cool': 1, 'coộl': 1})
|
self.ae(conn.term_row_counts(), {'cool': 1, 'coộl': 1})
|
||||||
|
conn = TestConn(remove_diacritics=False)
|
||||||
|
conn.insert_text('coộl')
|
||||||
|
self.ae(conn.term_row_counts(), {'coộl': 1})
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user