Merge branch 'obsd-master'
[tmux.git] / regress / if-shell-error.sh
blob2896d9aab14aed144db8290bbcefed306820d8a4
1 #!/bin/sh
3 # 883
4 # if-shell with an error should not core :-)
6 PATH=/bin:/usr/bin
7 TERM=screen
9 [ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
10 TMUX="$TEST_TMUX -Ltest"
11 $TMUX kill-server 2>/dev/null
13 TMP=$(mktemp)
14 OUT=$(mktemp)
15 trap "rm -f $TMP $OUT" 0 1 15
17 cat <<EOF >$TMP
18 if 'true' 'wibble wobble'
19 EOF
21 $TMUX -f$TMP -C new <<EOF >$OUT
22 EOF
23 grep -q "^%config-error $TMP:1: $TMP:1: unknown command: wibble$" $OUT