pentest-distro-builder/filesystem/root/.tmux/plugins/tmux-resurrect/lib/tmux-test/tests/test_tmux_scripting.sh
Kaj Forney 582f5b5f5c Add autologin and custom tmux config.
Former-commit-id: 09eacc3f3f761c2b3454d20356ba085d18bdb722
Former-commit-id: 89d8a1302bd2a72239fbe9ad9820be4ecda76cab
2018-09-27 17:40:01 -06:00

25 lines
464 B
Bash
Executable file

#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $CURRENT_DIR/helpers/helpers.sh
number_of_windows() {
tmux list-windows |
wc -l |
sed "s/ //g"
}
main() {
# start tmux in the background
tmux new -d
tmux new-window
local number_of_windows="$(number_of_windows)"
if ! [ "$number_of_windows" -eq 2 ]; then
fail_helper "Incorrect number of windows. Expected 2, got $number_of_windows"
fi
exit_helper
}
main