MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestPostgreSQLKeywordsRecognized

Function TestPostgreSQLKeywordsRecognized

pkg/sql/parser/dialect_test.go:132–146  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130}
131
132func TestPostgreSQLKeywordsRecognized(t *testing.T) {
133 tkz, err := tokenizer.NewWithDialect(keywords.DialectPostgreSQL)
134 if err != nil {
135 t.Fatal(err)
136 }
137
138 tokens, err := tkz.Tokenize([]byte("SELECT ILIKE"))
139 if err != nil {
140 t.Fatalf("tokenize failed: %v", err)
141 }
142
143 if len(tokens) < 2 {
144 t.Fatalf("expected at least 2 tokens, got %d", len(tokens))
145 }
146}
147
148// ---------------------------------------------------------------------------
149// Dialect gate tests - reject invalid cross-dialect syntax

Callers

nothing calls this directly

Calls 3

NewWithDialectFunction · 0.92
TokenizeMethod · 0.80
FatalfMethod · 0.65

Tested by

no test coverage detected