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

Function TestRenderSelect_LowercaseKeywords

pkg/formatter/render_test.go:95–109  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestRenderSelect_LowercaseKeywords(t *testing.T) {
96 stmt := &ast.SelectStatement{
97 Columns: []ast.Expression{&ast.Identifier{Name: "id"}},
98 From: []ast.TableReference{{Name: "t"}},
99 }
100
101 opts := ast.FormatOptions{KeywordCase: ast.KeywordLower, NewlinePerClause: false}
102 result := fmtStmt(stmt, opts)
103 if !strings.Contains(result, "select") {
104 t.Errorf("should contain lowercase select, got: %s", result)
105 }
106 if !strings.Contains(result, "from") {
107 t.Errorf("should contain lowercase from, got: %s", result)
108 }
109}
110
111func TestRenderSelect_Distinct(t *testing.T) {
112 stmt := &ast.SelectStatement{

Callers

nothing calls this directly

Calls 2

fmtStmtFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected