mirror of
https://github.com/tmux-plugins/tpm.git
synced 2025-09-14 00:46:56 +00:00
Tests style updates
This commit is contained in:
@ -1,28 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
TPM_DIR="$PWD"
|
||||
PLUGINS_DIR="$HOME/.tmux/plugins"
|
||||
|
||||
source $CURRENT_DIR/helpers.sh
|
||||
source "$CURRENT_DIR/helpers.sh"
|
||||
|
||||
manually_install_the_plugin() {
|
||||
mkdir -p ~/.tmux/plugins/
|
||||
cd ~/.tmux/plugins/
|
||||
mkdir -p "$PLUGINS_DIR"
|
||||
cd "$PLUGINS_DIR"
|
||||
git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin
|
||||
}
|
||||
|
||||
test_plugin_installation() {
|
||||
set_tmux_conf_helper <<- HERE
|
||||
set -g @plugin "tmux-plugins/tmux-example-plugin"
|
||||
run-shell "$PWD/tpm"
|
||||
run-shell "$TPM_DIR/tpm"
|
||||
HERE
|
||||
|
||||
manually_install_the_plugin
|
||||
|
||||
# opens tmux and test it with `expect`
|
||||
$CURRENT_DIR/expect_successful_update_of_all_plugins ||
|
||||
"$CURRENT_DIR/expect_successful_update_of_all_plugins" ||
|
||||
fail_helper "Tmux 'update all plugins' fails"
|
||||
|
||||
$CURRENT_DIR/expect_successful_update_of_a_single_plugin ||
|
||||
"$CURRENT_DIR/expect_successful_update_of_a_single_plugin" ||
|
||||
fail_helper "Tmux 'update single plugin' fails"
|
||||
|
||||
teardown_helper
|
||||
|
Reference in New Issue
Block a user