1
0
Fork 0
mirror of synced 2024-06-16 22:11:10 -04:00
tpm/tests/test_plugin_clean.sh

35 lines
666 B
Bash
Raw Normal View History

2015-05-26 23:46:15 -04:00
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2015-07-31 19:54:34 -04:00
TPM_DIR="$PWD"
PLUGINS_DIR="$HOME/.tmux/plugins"
2015-05-26 23:46:15 -04:00
2015-07-31 19:54:34 -04:00
source "$CURRENT_DIR/helpers.sh"
2015-05-26 23:46:15 -04:00
manually_install_the_plugin() {
2015-07-31 19:54:34 -04:00
rm -rf "$PLUGINS_DIR"
mkdir -p "$PLUGINS_DIR"
cd "$PLUGINS_DIR"
2015-05-26 23:46:15 -04:00
git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin
}
test_plugin_installation() {
set_tmux_conf_helper <<- HERE
2015-07-31 19:54:34 -04:00
run-shell "$TPM_DIR/tpm"
2015-05-26 23:46:15 -04:00
HERE
manually_install_the_plugin
# opens tmux and test it with `expect`
2015-07-31 19:54:34 -04:00
"$CURRENT_DIR/expect_successful_clean_plugins" ||
2015-05-26 23:46:15 -04:00
fail_helper "Clean fails"
teardown_helper
}
main() {
test_plugin_installation
exit_value_helper
}
main