From d098e94ad102da9d018acca72ca5a5c554d25a01 Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Mon, 2 Jun 2025 13:11:10 -0700 Subject: Update paths n stuff --- dots/tmux/.tmux/plugins/tpm/tests/helpers/tpm.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 dots/tmux/.tmux/plugins/tpm/tests/helpers/tpm.sh (limited to 'dots/tmux/.tmux/plugins/tpm/tests/helpers/tpm.sh') diff --git a/dots/tmux/.tmux/plugins/tpm/tests/helpers/tpm.sh b/dots/tmux/.tmux/plugins/tpm/tests/helpers/tpm.sh new file mode 100644 index 0000000..1594afb --- /dev/null +++ b/dots/tmux/.tmux/plugins/tpm/tests/helpers/tpm.sh @@ -0,0 +1,13 @@ +check_dir_exists_helper() { + [ -d "$1" ] +} + +# runs the scripts and asserts it has the correct output and exit code +script_run_helper() { + local script="$1" + local expected_output="$2" + local expected_exit_code="${3:-0}" + $script 2>&1 | + grep "$expected_output" >/dev/null 2>&1 && # grep -q flag quits the script early + [ "${PIPESTATUS[0]}" -eq "$expected_exit_code" ] +} -- cgit v1.2.3-70-g09d2