File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -15,22 +15,34 @@ class FTSIntegrationTests: SQLiteTestCase {
1515 let index = VirtualTable ( " index " )
1616
1717 private func createIndex( ) throws {
18- try db. run ( index. create ( . FTS5( FTS5Config ( )
19- . column ( email)
20- . tokenizer ( . Unicode61( ) )
21- ) ) )
18+ do {
19+ try db. run ( index. create ( . FTS5(
20+ FTS5Config ( )
21+ . column ( email)
22+ . tokenizer ( . Unicode61( ) ) )
23+ ) )
24+ } catch let error as Result {
25+ try XCTSkipIf ( error. description. starts ( with: " no such model " ) )
26+ throw error
27+ }
2228
2329 for user in try db. prepare ( users) {
2430 try db. run ( index. insert ( email <- user [ email] ) )
2531 }
2632 }
2733
2834 private func createTrigramIndex( ) throws {
29- try XCTSkipUnless ( db. satisfiesMinimumVersion ( minor: 34 ) )
30- try db. run ( index. create ( . FTS5( FTS5Config ( )
31- . column ( email)
32- . tokenizer ( . Trigram( caseSensitive: false ) )
33- ) ) )
35+ do {
36+ try db. run ( index. create ( . FTS5(
37+ FTS5Config ( )
38+ . column ( email)
39+ . tokenizer ( . Trigram( caseSensitive: false ) ) )
40+ ) )
41+ } catch let error as Result {
42+ try XCTSkipIf ( error. description. starts ( with: " no such model " ) ||
43+ error. description. starts ( with: " parse error in " ) )
44+ throw error
45+ }
3446
3547 for user in try db. prepare ( users) {
3648 try db. run ( index. insert ( email <- user [ email] ) )
You can’t perform that action at this time.
0 commit comments