Merge branch 'obsd-master'
[tmux.git] / regress / capture-pane-sgr0.sh
blob5d21ccc41a169b1c3b45ccc0c0dc87a940466fe6
1 #!/bin/sh
3 # 884
4 # capture-pane should send colours after SGR 0
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 trap "rm -f $TMP" 0 1 15
16 $TMUX -f/dev/null new -d "
17 printf '\033[31;42;1mabc\033[0;31mdef\n'
18 printf '\033[m\033[100m bright bg \033[m'
19 $TMUX capturep -peS0 -E1 >>$TMP"
22 sleep 1
25 printf '\033[1m\033[31m\033[42mabc\033[0m\033[31mdef\033[39m\n'
26 printf '\033[100m bright bg \033[49m\n'
27 ) | cmp - $TMP || exit 1
29 $TMUX has 2>/dev/null && exit 1
31 exit 0