MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_regexpi_function

Function test_regexpi_function

src/functions/regex_functions.rs:108–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106
107 #[test]
108 fn test_regexpi_function() {
109 let conn = Connection::open_in_memory().unwrap();
110 register_regex_functions(&conn).unwrap();
111
112 // Test case-insensitive match
113 let result: bool = conn
114 .query_row("SELECT regexpi('TEST', 'testing')", [], |row| row.get(0))
115 .unwrap();
116 assert!(result);
117
118 // Test with mixed case
119 let result: bool = conn
120 .query_row("SELECT regexpi('TeSt', 'TEST')", [], |row| row.get(0))
121 .unwrap();
122 assert!(result);
123 }
124
125 #[test]
126 fn test_invalid_regex() {

Callers

nothing calls this directly

Calls 2

register_regex_functionsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected