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

Function TestKeywordDocumentation

pkg/lsp/server_test.go:384–397  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

382}
383
384func TestKeywordDocumentation(t *testing.T) {
385 // Test that we have documentation for common keywords
386 keywords := []string{
387 "SELECT", "FROM", "WHERE", "JOIN", "INSERT", "UPDATE", "DELETE",
388 "CREATE", "DROP", "ALTER", "GROUP", "ORDER", "HAVING", "LIMIT",
389 }
390
391 for _, kw := range keywords {
392 doc := getKeywordDocumentation(kw)
393 if doc == "" {
394 t.Errorf("missing documentation for keyword %s", kw)
395 }
396 }
397}
398
399func TestExtractPositionFromError(t *testing.T) {
400 content := "SELECT *\nFROM users\nWHERE id = 1"

Callers

nothing calls this directly

Calls 2

getKeywordDocumentationFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected