tests: add some selecting words/paragraphs in backlog

This commit is contained in:
Boris Faure 2019-02-19 23:13:03 +01:00
parent 4bc04c5421
commit 1218262ad0
2 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,78 @@
#!/bin/sh
# char width: 7
# char height: 15
# clear screen
printf '\033[2J'
# set color
printf '\033[46;31;3m'
#move to 2,0
printf '\033[2H'
# set text
TEXT="The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you will know My name is the Lord when I lay My vengeance upon thee."
# display text
printf "%s\r\n%s\r\n%s" "$TEXT" "$TEXT" "$TEXT"
# mouse down to start selection
printf '\033}td;395;148;1;0;0\0'
# mouse move
printf '\033}tm;525;148;0\0'
# mouse up
printf '\033}tu;525;148;1;0;0\0'
# force render
printf '\033}tr\0'
# selection is
printf '\033}tsthe name of charity\0'
# scroll 30 lines
for L in $(seq 30); do
printf '%s\r\n' "$L"
done
# force render
printf '\033}tr\0'
# mouse wheel up
for _ in $(seq 6); do
printf '\033}tw;0;0;1;1;0\0'
done
# force render
printf '\033}tr\0'
## double click: word selection
printf '\033}td;230;135;1;0;0\0'
printf '\033}tu;230;135;1;0;0\0'
printf '\033}td;230;135;1;0;1\0'
printf '\033}tu;230;135;1;0;1\0'
# force render
printf '\033}tr\0'
# selection is
printf '\033}tsfurious\0'
# remove selection
printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0'
printf '\033}tc;0;0\0\033}tc;1;0\0'
## triple click: full paragraph selection
printf '\033}td;236;132;1;0;0\0'
printf '\033}tu;236;132;1;0;0\0'
printf '\033}td;236;132;1;0;1\0'
printf '\033}tu;236;132;1;0;1\0'
printf '\033}td;236;132;1;0;2\0'
printf '\033}tu;236;132;1;0;2\0'
# force render
printf '\033}tr\0'
# selection is
printf '\033}ts%s\0' "$TEXT"
# remove selection
printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0'
printf '\033}tc;0;0\0\033}tc;1;0\0'

View File

@ -87,3 +87,4 @@ selection_double_click.sh 8a9cd9ab55dacf0b2eef17d9bc57cd17
selection_triple_click.sh 5b9bafc5802342ff3ee2bc6a8629cbe0
selection_scrolls.sh 0cccd9abeeefb41b7cc6ca3350bfab7c
selection_with_margins_scrolled.sh 9dd8ec681d09d03101b6e5dfcfaa632a
selection_triple_click_in_history.sh 8f209978582bc223ad096cd694f2ee91