mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Add and use test helpers to create/kill test-specific tmux sessions
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user