Better comment handling in SQL regex, refs #1860

This commit is contained in:
Simon Willison 2022-10-27 11:47:41 -07:00
commit b597bb6b3e
2 changed files with 6 additions and 4 deletions

View file

@ -142,6 +142,7 @@ def test_custom_json_encoder(obj, expected):
"PRAGMA case_sensitive_like = true",
"SELECT * FROM pragma_not_on_allow_list('idx52')",
"/* This comment is not valid. select 1",
"/**/\nupdate foo set bar = 1\n/* test */ select 1",
],
)
def test_validate_sql_select_bad(bad_sql):