From c23289479245535a1f50900dfeed6b9cfe1ec12f Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sun, 24 Nov 2024 20:34:51 +0100 Subject: [PATCH] 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_. --- test/test_unit_configure_paths.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_unit_configure_paths.py b/test/test_unit_configure_paths.py index d2a680e..9d7b1a5 100644 --- a/test/test_unit_configure_paths.py +++ b/test/test_unit_configure_paths.py @@ -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