1
0
Fork 0
mirror of synced 2024-12-22 06:31:07 -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 8c2f833b43
commit c232894792
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= XDG_DATA_HOME=
HOME="{HOME}" set_yadm_dirs HOME="{HOME}" set_yadm_dirs
configure_paths 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) run = runner(command=["bash"], inp=script, cwd=cwd)
assert run.success assert run.success