Skip to content

Commit

Permalink
Add test case for #542.
Browse files Browse the repository at this point in the history
  • Loading branch information
andialbrecht committed Mar 16, 2024
1 parent 6b10952 commit ee550f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,3 +722,10 @@ def test_format_right_margin_invalid_option(right_margin):
def test_format_right_margin():
# TODO: Needs better test, only raises exception right now
sqlparse.format('foo', right_margin="79")


def test_format_json_ops(): # issue542
formatted = sqlparse.format(
"select foo->'bar', foo->'bar';", reindent=True)
expected = "select foo->'bar',\n foo->'bar';"
assert formatted == expected

0 comments on commit ee550f1

Please sign in to comment.