summaryrefslogtreecommitdiffstats
path: root/regress/new-session-no-client.sh
blob: 88c064cdf334891d126ca57da58b4fda1dd97b57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# 869
# new with no client (that is, from the config file) should imply -d and
# not attach

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 -stest
EOF

$TMUX -f$TMP start || exit 1
sleep 1 && $TMUX has -t=test: || exit 1
$TMUX kill-server 2>/dev/null

exit 0