Open ach5948 opened 1 month ago
This is may be a bashism, but parameter_expansion seems to differ from bash when the replacement value for :- has spaces in it.
:-
Example:
bash:
$ echo "-${FOO:-testing string}-" -testing string-
parameter-expansion:
>>> parameter_expansion.expand("-${FOO:-testing string}-") '-testing-'
(Expected: `'-testing value-')
Additionally, and possibly related, adding single quotes also differs from bash:
$ echo "-${FOO:-'testing string'}-" -'testing string'-
>>> parameter_expansion.expand("-${FOO:-'testing string'}-") '-testing string-'
(Expected: "-'testing string'-")
"-'testing string'-"
This issue appears for python 3.10 on the main branch, and for python 3.8 for parameter-expansion 0.2.0 and parameter-expansion-patched 0.3.1 (no other python/package combinations were tried)
This is may be a bashism, but parameter_expansion seems to differ from bash when the replacement value for
:-
has spaces in it.Description
Example:
bash:
parameter-expansion:
(Expected: `'-testing value-')
Additionally, and possibly related, adding single quotes also differs from bash:
bash:
parameter-expansion:
(Expected:
"-'testing string'-"
)Affected Versions
This issue appears for python 3.10 on the main branch, and for python 3.8 for parameter-expansion 0.2.0 and parameter-expansion-patched 0.3.1 (no other python/package combinations were tried)