From 197d407b769dcfa55e050aa73c31062e0e8e1080 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Mon, 4 May 2020 22:55:14 +0200 Subject: [PATCH] tests: add one making a box selection in the backlog --- tests/selection_box_in_history.sh | 42 +++++++++++++++++++++++++++++++ tests/tests.results | 1 + 2 files changed, 43 insertions(+) create mode 100755 tests/selection_box_in_history.sh diff --git a/tests/selection_box_in_history.sh b/tests/selection_box_in_history.sh new file mode 100755 index 00000000..1f173311 --- /dev/null +++ b/tests/selection_box_in_history.sh @@ -0,0 +1,42 @@ +#!/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\r\n" "1>$TEXT" "2>$TEXT" "3>$TEXT" +printf "%s\r\n%s\r\n%s\r\n" "4>$TEXT" "5>$TEXT" "6>$TEXT" +# force render +printf '\033}tr\0' + +# mouse wheel up +for _ in $(seq 5); do + printf '\033}tw;0;0;1;1;0\0' +done + +# force render +printf '\033}tr\0' + +## box selection +# mouse down to start selection +printf '\033}td;35;118;1;4;0\0' +# mouse move +printf '\033}tm;125;135;4\0' +# mouse up +printf '\033}tu;125;135;1;4;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsce upon thee.\047e path of the 0' diff --git a/tests/tests.results b/tests/tests.results index 5d6cf5ab..69fc10ff 100644 --- a/tests/tests.results +++ b/tests/tests.results @@ -130,3 +130,4 @@ zero-width-spaces.sh 4bbf6bbaef5f651d27b7593d82650de9 link_detection_email_surrounded.sh cb14f5c5601c045507220db6b503b1f2 link_detection_email_surrounded_more.sh ea1d93214a35ee2812964345bba303fc selection_scrolls_up.sh c0fc70e8d865236d66edc7ad13af4dbe +selection_box_in_history.sh 61b78306851097efcfd1b41b777f15c9