(t *testing.T)
| 44 | } |
| 45 | |
| 46 | func TestKeywords_IsReserved(t *testing.T) { |
| 47 | k := New(DialectGeneric, true) // Use generic dialect with case-insensitive matching |
| 48 | tests := []struct { |
| 49 | word string |
| 50 | expected bool |
| 51 | }{ |
| 52 | {"SELECT", true}, // Reserved keyword |
| 53 | {"COUNT", true}, // Reserved keyword |
| 54 | {"FROM", true}, // Reserved keyword |
| 55 | {"select", true}, // Case insensitive |
| 56 | {"count", true}, // Case insensitive |
| 57 | {"NOTAKEYWORD", false}, |
| 58 | } |
| 59 | |
| 60 | for _, tt := range tests { |
| 61 | if got := k.IsReserved(tt.word); got != tt.expected { |
| 62 | t.Errorf("IsReserved(%q) = %v, want %v", tt.word, got, tt.expected) |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func TestKeywords_GetKeyword(t *testing.T) { |
| 68 | k := New(DialectGeneric, true) // Use generic dialect with case-insensitive matching |
nothing calls this directly
no test coverage detected