mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Add hyperlink test, from Jeff Chiang.
This commit is contained in:
parent
57fec74966
commit
8e8b9865d1
30
regress/capture-pane-hyperlink.sh
Normal file
30
regress/capture-pane-hyperlink.sh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# capture-pane -e for OSC 8 hyperlink
|
||||||
|
|
||||||
|
PATH=/bin:/usr/bin
|
||||||
|
TERM=screen
|
||||||
|
|
||||||
|
[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
|
||||||
|
TMUX="$TEST_TMUX -Ltest"
|
||||||
|
TMP=$(mktemp)
|
||||||
|
TMP2=$(mktemp)
|
||||||
|
trap "rm -f $TMP $TMP2" 0 1 15
|
||||||
|
$TMUX kill-server 2>/dev/null
|
||||||
|
|
||||||
|
do_test() {
|
||||||
|
$TMUX -f/dev/null new -d "
|
||||||
|
printf '$1'
|
||||||
|
$TMUX capturep -peS0 -E1 >$TMP"
|
||||||
|
echo $2 > $TMP2
|
||||||
|
sleep 1
|
||||||
|
cmp $TMP $TMP2 || exit 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
do_test '\033]8;id=1;https://github.com\033\\test1\033]8;;\033\\\n' '\033]8;id=1;https://github.com\033\\test1\033]8;;\033\\\n' || exit 1
|
||||||
|
do_test '\033]8;;https://github.com/tmux/tmux\033\\test1\033]8;;\033\\\n' '\033]8;;https://github.com/tmux/tmux\033\\test1\033]8;;\033\\\n' || exit 1
|
||||||
|
|
||||||
|
$TMUX has 2>/dev/null && exit 1
|
||||||
|
|
||||||
|
exit 0
|
@ -22,8 +22,8 @@ $TMUX -f/dev/null new -d "
|
|||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
(
|
(
|
||||||
printf '\033[1m\033[31m\033[42mabc\033[0m\033[31m\033[49mdef\033[39m\n'
|
printf '\033[1m\033[31m\033[42mabc\033[0m\033[31m\033[49mdef\n'
|
||||||
printf '\033[100m bright bg \033[49m\n'
|
printf '\033[39m\033[100m bright bg\n'
|
||||||
) | cmp - $TMP || exit 1
|
) | cmp - $TMP || exit 1
|
||||||
|
|
||||||
$TMUX has 2>/dev/null && exit 1
|
$TMUX has 2>/dev/null && exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user