Skip to content

Commit

Permalink
add further unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
greole committed Apr 25, 2024
1 parent 76f8168 commit f46ac34
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_dictParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@ def parse_and_convert_back(text):
assert result_dict == {"p_rgh": "foo bar"}
assert result_text == text

text = """p_rgh
{
\tfoo bar;
}
"""

result_dict, result_text = parse_and_convert_back(text)
assert result_dict == {"p_rgh": {"foo": "bar"}}
assert result_text == text

text = """\"p_rgh|foo|p_bar\"
{
\tfoo bar;
\t$p;
}
"""
result_dict, result_text = parse_and_convert_back(text)
assert result_dict == {'"p_rgh|foo|p_bar"': {"foo": "bar", "$_p": "p"}}
assert result_text == text

text = """key
{
\tfoo bar;
Expand Down

0 comments on commit f46ac34

Please sign in to comment.