| 888 | } |
| 889 | |
| 890 | func TestRenderCase_LowerKeywords(t *testing.T) { |
| 891 | expr := &ast.CaseExpression{ |
| 892 | WhenClauses: []ast.WhenClause{ |
| 893 | {Condition: &ast.LiteralValue{Value: "true"}, Result: &ast.LiteralValue{Value: "1"}}, |
| 894 | }, |
| 895 | } |
| 896 | opts := ast.FormatOptions{KeywordCase: ast.KeywordLower} |
| 897 | result := fmtExpr(expr, opts) |
| 898 | if !strings.Contains(result, "case") || !strings.Contains(result, "when") || !strings.Contains(result, "end") { |
| 899 | t.Errorf("expected lowercase keywords in: %s", result) |
| 900 | } |
| 901 | } |
| 902 | |
| 903 | // ─── BETWEEN expression ────────────────────────────────────────────────────── |
| 904 | |