mirror of
https://github.com/tmux/tmux.git
synced 2025-01-13 03:48:51 +00:00
Update regress from master.
This commit is contained in:
parent
bbcfee362f
commit
fac792dc27
@ -7,3 +7,4 @@ all: $(TESTS)
|
|||||||
|
|
||||||
$(TESTS):
|
$(TESTS):
|
||||||
sh $*.sh
|
sh $*.sh
|
||||||
|
sleep 1
|
||||||
|
@ -28,7 +28,7 @@ $TMUX kill-server 2>/dev/null
|
|||||||
|
|
||||||
$TMUX -f/dev/null new -d || exit 1
|
$TMUX -f/dev/null new -d || exit 1
|
||||||
sleep 1
|
sleep 1
|
||||||
cat <<EOF|$TMUX -C a >$TMP
|
cat <<EOF|$TMUX -f/dev/null -C a >$TMP
|
||||||
ls -F':#{window_width} #{window_height}'
|
ls -F':#{window_width} #{window_height}'
|
||||||
refresh -C 80,24
|
refresh -C 80,24
|
||||||
ls -F':#{window_width} #{window_height}'
|
ls -F':#{window_width} #{window_height}'
|
||||||
@ -37,7 +37,7 @@ grep ^: $TMP >$OUT
|
|||||||
printf ":80 24\n:80 23\n"|cmp -s $OUT - || exit 1
|
printf ":80 24\n:80 23\n"|cmp -s $OUT - || exit 1
|
||||||
$TMUX kill-server 2>/dev/null
|
$TMUX kill-server 2>/dev/null
|
||||||
|
|
||||||
cat <<EOF|$TMUX -C new -x 100 -y 50 >$TMP
|
cat <<EOF|$TMUX -f/dev/null -C new -x 100 -y 50 >$TMP
|
||||||
ls -F':#{window_width} #{window_height}'
|
ls -F':#{window_width} #{window_height}'
|
||||||
refresh -C 80,24
|
refresh -C 80,24
|
||||||
ls -F':#{window_width} #{window_height}'
|
ls -F':#{window_width} #{window_height}'
|
||||||
|
6
regress/cursor-test.txt
Normal file
6
regress/cursor-test.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
||||||
|
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
|
||||||
|
commodo consequat. Duis aute
|
||||||
|
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
||||||
|
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
|
||||||
|
deserunt mollit anim id est laborum.
|
33
regress/cursor-test1.result
Normal file
33
regress/cursor-test1.result
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
14 8 t
|
||||||
|
0 ud exercitation ullamco laboris nisi ut
|
||||||
|
1 aliquip ex ea
|
||||||
|
2 commodo consequat. Duis aute
|
||||||
|
3 irure dolor in reprehenderit in voluptat
|
||||||
|
4 e velit esse cillum dolore eu fugiat
|
||||||
|
5 nulla pariatur. Excepteur sint occaecat
|
||||||
|
6 cupidatat non proident, sunt in culpa qu
|
||||||
|
7 i officia
|
||||||
|
8 deserunt mollit anim id est laborum.
|
||||||
|
9
|
||||||
|
4 6 t
|
||||||
|
0 cupidatat
|
||||||
|
1 non proide
|
||||||
|
2 nt, sunt i
|
||||||
|
3 n culpa qu
|
||||||
|
4 i officia
|
||||||
|
5 deserunt m
|
||||||
|
6 ollit anim
|
||||||
|
7 id est la
|
||||||
|
8 borum.
|
||||||
|
9
|
||||||
|
14 8 t
|
||||||
|
0 incididunt ut labore et dolore magna aliqua. Ut en
|
||||||
|
1 im ad minim veniam, quis nostrud exercitation ulla
|
||||||
|
2 mco laboris nisi ut aliquip ex ea
|
||||||
|
3 commodo consequat. Duis aute
|
||||||
|
4 irure dolor in reprehenderit in voluptate velit es
|
||||||
|
5 se cillum dolore eu fugiat
|
||||||
|
6 nulla pariatur. Excepteur sint occaecat cupidatat
|
||||||
|
7 non proident, sunt in culpa qui officia
|
||||||
|
8 deserunt mollit anim id est laborum.
|
||||||
|
9
|
29
regress/cursor-test1.sh
Normal file
29
regress/cursor-test1.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=/bin:/usr/bin
|
||||||
|
TERM=screen
|
||||||
|
|
||||||
|
[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
|
||||||
|
TMUX="$TEST_TMUX -f/dev/null -Ltest"
|
||||||
|
$TMUX kill-server 2>/dev/null
|
||||||
|
|
||||||
|
TMP=$(mktemp)
|
||||||
|
trap "rm -f $TMP" 0 1 15
|
||||||
|
|
||||||
|
$TMUX -f/dev/null new -d -x40 -y10 \
|
||||||
|
"cat cursor-test.txt; printf '\e[9;15H'; cat" || exit 1
|
||||||
|
$TMUX set -g window-size manual || exit 1
|
||||||
|
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x10 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x50 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
|
||||||
|
cmp -s $TMP cursor-test1.result || exit 1
|
||||||
|
|
||||||
|
$TMUX kill-server 2>/dev/null
|
||||||
|
exit 0
|
33
regress/cursor-test2.result
Normal file
33
regress/cursor-test2.result
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
9 7 a
|
||||||
|
0 cupidatat
|
||||||
|
1 non proide
|
||||||
|
2 nt, sunt i
|
||||||
|
3 n culpa qu
|
||||||
|
4 i officia
|
||||||
|
5 deserunt m
|
||||||
|
6 ollit anim
|
||||||
|
7 id est la
|
||||||
|
8 borum.
|
||||||
|
9
|
||||||
|
4 6 a
|
||||||
|
0 icia
|
||||||
|
1 deser
|
||||||
|
2 unt m
|
||||||
|
3 ollit
|
||||||
|
4 anim
|
||||||
|
5 id e
|
||||||
|
6 st la
|
||||||
|
7 borum
|
||||||
|
8 .
|
||||||
|
9
|
||||||
|
29 8 a
|
||||||
|
0 incididunt ut labore et dolore magna aliqua. Ut en
|
||||||
|
1 im ad minim veniam, quis nostrud exercitation ulla
|
||||||
|
2 mco laboris nisi ut aliquip ex ea
|
||||||
|
3 commodo consequat. Duis aute
|
||||||
|
4 irure dolor in reprehenderit in voluptate velit es
|
||||||
|
5 se cillum dolore eu fugiat
|
||||||
|
6 nulla pariatur. Excepteur sint occaecat cupidatat
|
||||||
|
7 non proident, sunt in culpa qui officia
|
||||||
|
8 deserunt mollit anim id est laborum.
|
||||||
|
9
|
29
regress/cursor-test2.sh
Normal file
29
regress/cursor-test2.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
$TMUX -f/dev/null new -d -x10 -y10 \
|
||||||
|
"cat cursor-test.txt; printf '\e[8;10H'; cat" || exit 1
|
||||||
|
$TMUX set -g window-size manual || exit 1
|
||||||
|
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x5 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x50 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
|
||||||
|
cmp -s $TMP cursor-test2.result || exit 1
|
||||||
|
|
||||||
|
$TMUX kill-server 2>/dev/null
|
||||||
|
exit 0
|
9
regress/cursor-test3.result
Normal file
9
regress/cursor-test3.result
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
6 1 b
|
||||||
|
0 abcdefa
|
||||||
|
1 bcdefab
|
||||||
|
3 1 b
|
||||||
|
0 fabcd
|
||||||
|
1 efab
|
||||||
|
6 1 b
|
||||||
|
0 abcdefa
|
||||||
|
1 bcdefab
|
29
regress/cursor-test3.sh
Normal file
29
regress/cursor-test3.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
$TMUX -f/dev/null new -d -x7 -y2 \
|
||||||
|
"printf 'abcdefabcdefab'; printf '\e[2;7H'; cat" || exit 1
|
||||||
|
$TMUX set -g window-size manual || exit 1
|
||||||
|
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x5 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x7 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
|
||||||
|
cmp -s $TMP cursor-test3.result || exit 1
|
||||||
|
|
||||||
|
$TMUX kill-server 2>/dev/null
|
||||||
|
exit 0
|
16
regress/cursor-test4.result
Normal file
16
regress/cursor-test4.result
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
0 1
|
||||||
|
0 abcdef
|
||||||
|
1
|
||||||
|
2
|
||||||
|
0 1
|
||||||
|
0 abcdef
|
||||||
|
1
|
||||||
|
2
|
||||||
|
0 1
|
||||||
|
0 def
|
||||||
|
1
|
||||||
|
2
|
||||||
|
0 1
|
||||||
|
0 abcdef
|
||||||
|
1
|
||||||
|
2
|
31
regress/cursor-test4.sh
Normal file
31
regress/cursor-test4.sh
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
$TMUX -f/dev/null new -d -x10 -y3 "printf 'abcdef\n'; cat" || exit 1
|
||||||
|
$TMUX set -g window-size manual || exit 1
|
||||||
|
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x20 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x3 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
$TMUX resizew -x10 || exit 1
|
||||||
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
||||||
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
||||||
|
|
||||||
|
cmp -s $TMP cursor-test4.result || exit 1
|
||||||
|
|
||||||
|
$TMUX kill-server 2>/dev/null
|
||||||
|
exit 0
|
@ -9,9 +9,9 @@ TERM=screen
|
|||||||
TMUX="$TEST_TMUX -Ltest"
|
TMUX="$TEST_TMUX -Ltest"
|
||||||
$TMUX kill-server 2>/dev/null
|
$TMUX kill-server 2>/dev/null
|
||||||
|
|
||||||
$TMUX new -d 'sleep 1000' || exit 1
|
$TMUX -f/dev/null new -d 'sleep 1000' || exit 1
|
||||||
P=$($TMUX display -pt0:0.0 '#{pane_pid}')
|
P=$($TMUX display -pt0:0.0 '#{pane_pid}')
|
||||||
$TMUX new -d || exit 1
|
$TMUX -f/dev/null new -d || exit 1
|
||||||
sleep 1
|
sleep 1
|
||||||
$TMUX kill-session -t0:
|
$TMUX kill-session -t0:
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
Reference in New Issue
Block a user