File tree 1 file changed +22
-2
lines changed
crates/lib/test/fixtures/rules/std_rule_cases
1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -204,14 +204,34 @@ test_pass_column_name_definition_multiple:
204
204
cte_1.var,
205
205
cte_2.var
206
206
FROM cte_1, cte_2;
207
+
207
208
208
- test_pass_edge_case_leading_comma :
209
- # Regression test for panic with leading comma CTE
209
+ test_pass_leading_comma_cte :
210
+ # https://github.com/quarylabs/sqruff/issues/1584
210
211
pass_str : |
211
212
with x as (
212
213
select 1 as a
213
214
)
215
+
216
+ , b as ( select 2 as e)
214
217
218
+ select *
219
+ from x, b;
220
+
221
+ test_fail_edge_case_leading_comma :
222
+ # https://github.com/quarylabs/sqruff/issues/1584
223
+ fail_str : |
224
+ with x as (
225
+ select 1 as a
226
+ )
227
+ , b as ( select 2 as e)
228
+
229
+ select *
230
+ from x, b;
231
+ fix_str : |
232
+ with x as (
233
+ select 1 as a
234
+ )
215
235
, b as ( select 2 as e)
216
236
217
237
select *
You can’t perform that action at this time.
0 commit comments