tests: add a test about selection keeping up while text is scrolling

terminology-1.4
Boris Faure 4 years ago
parent 3b0a932d28
commit 9247665ada
  1. 47
      tests/selection_scrolls.sh
  2. 1
      tests/tests.results

@ -0,0 +1,47 @@
#!/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;10;325;1;0;0\0'
# mouse move
printf '\033}tm;100;325;0\0'
# mouse up
printf '\033}tu;100;325;1;0;0\0'
# force render
printf '\033}tr\0'
# selection is
printf '\033}tsnce upon thee.\0'
# scroll 20 lines
for _ in $(seq 20); do
printf '\r\n'
done
# selection is
printf '\033}tsnce upon thee.\0'
# scroll 20 lines
for _ in $(seq 20); do
printf '\r\n'
done
# selection is no longer active
printf '\033}tn\0'

@ -85,3 +85,4 @@ selection_drag.sh d52ca96d26bdc7b77cd815870c07195a
selection_box_drag.sh d52ca96d26bdc7b77cd815870c07195a
selection_double_click.sh 8a9cd9ab55dacf0b2eef17d9bc57cd17
selection_triple_click.sh 5b9bafc5802342ff3ee2bc6a8629cbe0
selection_scrolls.sh 0cccd9abeeefb41b7cc6ca3350bfab7c

Loading…
Cancel
Save