tests: test xterm OSC 10/11 to change/get {fore,back}ground colors

This commit is contained in:
Boris Faure 2020-06-23 00:05:12 +02:00
parent 196973fcd3
commit f168a97a35
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
3 changed files with 52 additions and 0 deletions

View File

@ -143,3 +143,5 @@ color_link_edc.sh a6e4b47eb65c04da568b9662fd80b7e0
color_link_css_rgb.sh c1f5a5b4f3d87b710aed59f72439a645
color_link_css_hsl.sh fc9bda72bd4eea5e9414ef9755ae176a
crash_empty_osc.sh b87272896ce7be9856253b32be1bef14
xterm-osc-10.sh b8c23c9c5482b1e9c30d8a261edc29f0
xterm-osc-11.sh 3e02038964b78d948fb599c996bf370d

25
tests/xterm-osc-10.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# char width: 7
# char height: 15
# set color
printf '\033[0;46;3m'
# clear screen
printf '\033[2J'
# move to 0; 0
printf '\033[0;0H'
printf 'The purpose of computing is insight, not numbers.\r\n'
printf 'Richard Hamming\r\n'
# invalid colors
printf '\033]10;#ff0\007'
printf '\033]10;#FfFfFfFf\007'
printf '\033]10;fff000\007'
# change foreground color and then query it
printf '\033]10;#ff00FF\007'
printf '\033]10;?\007'
sleep 0.1

25
tests/xterm-osc-11.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# char width: 7
# char height: 15
# set color
printf '\033[0;31;3m'
# clear screen
printf '\033[2J'
# move to 0; 0
printf '\033[0;0H'
printf 'The purpose of computing is insight, not numbers.\r\n'
printf 'Richard Hamming\r\n'
# invalid colors
printf '\033]11;#ff0\007'
printf '\033]11;#FfFfFfFf\007'
printf '\033]11;fff000\007'
# change background color and then query it
printf '\033]11;#ff00FF\007'
printf '\033]11;?\007'
sleep 0.1