1
0
mirror of https://github.com/tmux/tmux.git synced 2024-12-14 10:58:48 +00:00
tmux/regress/new-window-command.sh
2017-04-27 13:09:08 +01:00

27 lines
390 B
Bash

#!/bin/sh
# new session command
PATH=/bin:/usr/bin
TERM=screen
[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
TMUX="$TEST_TMUX -Ltest"
$TMUX kill-server 2>/dev/null
TMP=$(mktemp)
trap "rm -f $TMP" 0 1 15
cat <<EOF >$TMP
new
neww sleep 101
neww -- sleep 102
neww "sleep 103"
EOF
$TMUX -f$TMP start
[ $($TMUX lsw|wc -l) -eq 4 ] || exit 1
$TMUX kill-server 2>/dev/null
exit 0