Add and use test helpers to create/kill test-specific tmux sessions

This commit is contained in:
2014-06-04 00:07:23 +01:00
parent 87d767d1c5
commit d47838ca1f
3 changed files with 42 additions and 25 deletions

View File

@@ -8,17 +8,15 @@ source "${root}/lib/util.sh"
# Setup.
libexec="${root}/libexec"
export TMUXIFIER_TMUX_OPTS="-L tmuxifier-tests"
tmux $TMUXIFIER_TMUX_OPTS new-session -d -s foobar
tmux $TMUXIFIER_TMUX_OPTS new-session -d -s dude
test-socket-tmux new-session -d -s foobar
test-socket-tmux new-session -d -s dude
# Passes all arguments to Tmux.
assert "${libexec}/tmuxifier-tmux list-sessions -F \"- #{session_name}\"" \
"- dude\n- foobar"
# Tear down.
tmux $TMUXIFIER_TMUX_OPTS kill-server
unset TMUXIFIER_TMUX_OPTS
kill-test-server
# End of tests.
assert_end "tmuxifier-tmux"