1
0
Fork 0
mirror of synced 2024-12-04 14:45:36 -05:00

Make test_unit_configure_paths work with bash 3

Bash 3 doesn't understand declare -p so use regular parameter expansion instead
to print all variables that begin with YADM_ or GIT_.
This commit is contained in:
Erik Flodin 2024-11-24 20:34:51 +01:00
parent 30fa6f08a4
commit 01df4a82c4
No known key found for this signature in database
GPG key ID: 420A7C865EE3F85F

View file

@ -89,7 +89,9 @@ def run_test(runner, paths, args, expected_matches, cwd=None):
XDG_DATA_HOME=
HOME="{HOME}" set_yadm_dirs
configure_paths
declare -p | grep -E '(YADM|GIT)_'
for var in "${{!YADM_@}}" "${{!GIT_@}}"; do
echo "$var=\\"${{!var}}\\""
done
"""
run = runner(command=["bash"], inp=script, cwd=cwd)
assert run.success