summaryrefslogtreecommitdiff
path: root/tmux/.tmux/plugins/tpm/tests/test_plugin_clean.sh
diff options
context:
space:
mode:
authorElizabeth <me@liz.coffee>2025-06-02 13:11:10 -0700
committerElizabeth <me@liz.coffee>2025-06-02 13:11:10 -0700
commitd098e94ad102da9d018acca72ca5a5c554d25a01 (patch)
treed6d23ee63ad5a1aa4017a605d9e09e75de2c5f49 /tmux/.tmux/plugins/tpm/tests/test_plugin_clean.sh
parentede675866355d34ac9fdc1b8e047576f574bdfa2 (diff)
downloaddotfiles-d098e94ad102da9d018acca72ca5a5c554d25a01.tar.gz
dotfiles-d098e94ad102da9d018acca72ca5a5c554d25a01.zip
Update paths n stuff
Diffstat (limited to 'tmux/.tmux/plugins/tpm/tests/test_plugin_clean.sh')
-rwxr-xr-xtmux/.tmux/plugins/tpm/tests/test_plugin_clean.sh67
1 files changed, 0 insertions, 67 deletions
diff --git a/tmux/.tmux/plugins/tpm/tests/test_plugin_clean.sh b/tmux/.tmux/plugins/tpm/tests/test_plugin_clean.sh
deleted file mode 100755
index d36c468..0000000
--- a/tmux/.tmux/plugins/tpm/tests/test_plugin_clean.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env bash
-
-CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-TPM_DIR="$PWD"
-PLUGINS_DIR="$HOME/.tmux/plugins"
-
-source "$CURRENT_DIR/helpers/helpers.sh"
-source "$CURRENT_DIR/helpers/tpm.sh"
-
-manually_install_the_plugin() {
- rm -rf "$PLUGINS_DIR"
- mkdir -p "$PLUGINS_DIR"
- cd "$PLUGINS_DIR"
- git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin
-}
-
-# TMUX KEY-BINDING TESTS
-
-test_plugin_uninstallation_via_tmux_key_binding() {
- set_tmux_conf_helper <<- HERE
- set -g mode-keys vi
- run-shell "$TPM_DIR/tpm"
- HERE
-
- manually_install_the_plugin
-
- "$CURRENT_DIR/expect_successful_clean_plugins" ||
- fail_helper "[key-binding] clean fails"
-
- teardown_helper
-}
-
-# SCRIPT TESTS
-
-test_plugin_uninstallation_via_script() {
- set_tmux_conf_helper <<- HERE
- set -g mode-keys vi
- run-shell "$TPM_DIR/tpm"
- HERE
-
- manually_install_the_plugin
-
- script_run_helper "$TPM_DIR/bin/clean_plugins" '"tmux-example-plugin" clean success' ||
- fail_helper "[script] plugin cleaning fails"
-
- teardown_helper
-}
-
-test_unsuccessful_plugin_uninstallation_via_script() {
- set_tmux_conf_helper <<- HERE
- set -g mode-keys vi
- run-shell "$TPM_DIR/tpm"
- HERE
-
- manually_install_the_plugin
- chmod 000 "$PLUGINS_DIR/tmux-example-plugin" # disable directory deletion
-
- local expected_exit_code=1
- script_run_helper "$TPM_DIR/bin/clean_plugins" '"tmux-example-plugin" clean fail' "$expected_exit_code" ||
- fail_helper "[script] unsuccessful plugin cleaning doesn't fail"
-
- chmod 755 "$PLUGINS_DIR/tmux-example-plugin" # enable directory deletion
-
- teardown_helper
-}
-
-run_tests