1
0
Fork 0
mirror of synced 2024-10-29 14:58:58 -04:00
tpm/tests/test_plugin_update.sh

36 lines
781 B
Bash
Raw Normal View History

2014-08-05 15:44:25 -04:00
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $CURRENT_DIR/helpers.sh
manually_install_the_plugin() {
mkdir -p ~/.tmux/plugins/
cd ~/.tmux/plugins/
git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin
}
test_plugin_installation() {
set_tmux_conf_helper <<- HERE
2015-07-06 19:49:33 -04:00
set -g @plugin "tmux-plugins/tmux-example-plugin"
2014-11-19 09:58:04 -05:00
run-shell "$PWD/tpm"
2014-08-05 15:44:25 -04:00
HERE
manually_install_the_plugin
# opens tmux and test it with `expect`
$CURRENT_DIR/expect_successful_update_of_all_plugins ||
fail_helper "Tmux 'update all plugins' fails"
$CURRENT_DIR/expect_successful_update_of_a_single_plugin ||
fail_helper "Tmux 'update single plugin' fails"
teardown_helper
}
main() {
test_plugin_installation
exit_value_helper
}
main