Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrir-san committed Dec 18, 2023
1 parent a1b500c commit e0b769b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def test_connections_file_get_default_connection_url(tmp_empty, content, expecte
),
(
"select 'hello'[:-2]",
"hell",
"hel",
),
],
)
Expand Down Expand Up @@ -897,6 +897,11 @@ def test_escape_string_slicing_notation(query, expected_escaped, expected_found)
"-p --save snippet -N ",
"insert into authors values('[100]'::json->0)",
),
(
"--save snippet SELECT TRIM(' padded ')",
"--save snippet ",
"SELECT TRIM(' padded ')",
),
],
ids=[
"no-query",
Expand All @@ -910,6 +915,7 @@ def test_escape_string_slicing_notation(query, expected_escaped, expected_found)
"update",
"delete",
"insert",
"select-uppercase",
],
)
def test_split_args_and_sql(line, expected_args, expected_sql):
Expand Down

0 comments on commit e0b769b

Please sign in to comment.