fix: allow colon in options interpolation

This commit is contained in:
2024-09-23 13:52:49 +03:00
parent df2e98a1d3
commit 9e30e98e90
2 changed files with 8 additions and 1 deletions

View File

@ -24,6 +24,9 @@ def _parser() -> dict[str, dict[str, str]]:
"key3": "${section1:home}",
"key5": "${section1:key4}",
},
"section4:suffix": {
"key6": "value6"
},
}
@ -45,6 +48,10 @@ def test_extract_variables() -> None:
assert not dict(ShellInterpolator._extract_variables(parser, "${section4:key1}", parser["section1"]))
assert dict(ShellInterpolator._extract_variables(parser, "${section4:suffix:key6}", parser["section1"])) == {
"section4:suffix:key6": "value6",
}
def test_environment() -> None:
"""