TestRejectILIKEInSQLServer checks that ILIKE is rejected in SQL Server mode.
(t *testing.T)
| 321 | |
| 322 | // TestRejectILIKEInSQLServer checks that ILIKE is rejected in SQL Server mode. |
| 323 | func TestRejectILIKEInSQLServer(t *testing.T) { |
| 324 | sql := "SELECT * FROM users WHERE name ILIKE '%alice%'" |
| 325 | _, err := ParseWithDialect(sql, keywords.DialectSQLServer) |
| 326 | if err == nil { |
| 327 | t.Fatal("expected error: ILIKE should be rejected in SQL Server dialect") |
| 328 | } |
| 329 | if !containsAny(err.Error(), "ILIKE", "PostgreSQL", "LIKE") { |
| 330 | t.Errorf("error should mention ILIKE, got: %v", err) |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | // TestRejectNotILIKEInMySQL checks that NOT ILIKE is rejected in MySQL mode. |
| 335 | func TestRejectNotILIKEInMySQL(t *testing.T) { |
nothing calls this directly
no test coverage detected