Merge branch 'obsd-master'
[tmux.git] / regress / command-order.sh
blob04046f0d071f3783d85f0f1d5cc4c30a348fdac8
1 #!/bin/sh
3 PATH=/bin:/usr/bin
4 TERM=screen
6 [ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
7 TMUX="$TEST_TMUX -Ltest"
8 $TMUX kill-server 2>/dev/null
10 TMP=$(mktemp)
11 trap "rm -f $TMP" 0 1 15
13 cat <<EOF >$TMP
14 new -sfoo -nfoo0; neww -nfoo1; neww -nfoo2
15 new -sbar -nbar0; neww -nbar1; neww -nbar2
16 EOF
17 $TMUX -f$TMP start </dev/null || exit 1
18 sleep 1
19 $TMUX lsw -aF '#{session_name},#{window_name}'|sort >$TMP || exit 1
20 $TMUX kill-server 2>/dev/null
21 cat <<EOF|cmp -s $TMP - || exit 1
22 bar,bar0
23 bar,bar1
24 bar,bar2
25 foo,foo0
26 foo,foo1
27 foo,foo2
28 EOF
30 cat <<EOF >$TMP
31 new -sfoo -nfoo0
32 neww -nfoo1
33 neww -nfoo2
34 new -sbar -nbar0
35 neww -nbar1
36 neww -nbar2
37 EOF
38 $TMUX -f$TMP start </dev/null || exit 1
39 sleep 1
40 $TMUX lsw -aF '#{session_name},#{window_name}'|sort >$TMP || exit 1
41 $TMUX kill-server 2>/dev/null
42 cat <<EOF|cmp -s $TMP - || exit 1
43 bar,bar0
44 bar,bar1
45 bar,bar2
46 foo,foo0
47 foo,foo1
48 foo,foo2
49 EOF
51 exit 0