(t *testing.T)
| 21 | ) |
| 22 | |
| 23 | func TestClickHouseDialectKeywords(t *testing.T) { |
| 24 | kws := keywords.DialectKeywords(keywords.DialectClickHouse) |
| 25 | if len(kws) == 0 { |
| 26 | t.Fatal("expected ClickHouse keywords, got none") |
| 27 | } |
| 28 | found := map[string]bool{} |
| 29 | for _, kw := range kws { |
| 30 | found[kw.Word] = true |
| 31 | } |
| 32 | required := []string{"PREWHERE", "FINAL", "ENGINE", "GLOBAL", "ASOF", "TTL", "FORMAT"} |
| 33 | for _, w := range required { |
| 34 | if !found[w] { |
| 35 | t.Errorf("missing expected ClickHouse keyword: %s", w) |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func TestClickHouseInAllDialects(t *testing.T) { |
| 41 | found := false |
nothing calls this directly
no test coverage detected