billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=d5051ada14eca4b3023cdc33b0bcf24a3ca437f7
commit d5051ada14eca4b3023cdc33b0bcf24a3ca437f7 Author: Boris Faure <[email protected]> Date: Sun Feb 17 18:06:55 2019 +0100 tests: add some on dragging selections --- tests/selection_drag.sh | 365 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/tests.results | 1 + 2 files changed, 366 insertions(+) diff --git a/tests/selection_drag.sh b/tests/selection_drag.sh new file mode 100755 index 0000000..1e5b9b2 --- /dev/null +++ b/tests/selection_drag.sh @@ -0,0 +1,365 @@ +#!/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 +printf "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 [...] + +## +# Mouse selection from top-left to down-right +# (x:2,y:2) to (x:6, y:3) +# -> (16, 35) to (44, 50) +## + +# mouse down to start selection +printf '\033}td;16;35;1;0;0\0' +# mouse move +printf '\033}tm;44;50;0\0' +# mouse up +printf '\033}tu;44;50;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tssh and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\0' + +## drag top-left corner to increase selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;13;35;1;0;0\0' +# mouse move +printf '\033}tm;2;35;0\0' +# mouse up +printf '\033}tu;2;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsfish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag top-left corner to decrease selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;3;35;1;0;0\0' +# mouse move +printf '\033}tm;12;35;0\0' +# mouse up +printf '\033}tu;12;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down-right corner to increase selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;46;50;1;0;0\0' +# mouse move +printf '\033}tm;57;50;0\0' +# mouse up +printf '\033}tu;57;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good will\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down right corner to decrease selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;58;50;1;0;0\0' +# mouse move +printf '\033}tm;43;50;0\0' +# mouse up +printf '\033}tu;43;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\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' +printf '\033}tr\0\033}tn\0' + + +## +# Mouse selection from down-right to top-left +# (x:6,y:3) to (x:2, y:2) +# -> (44, 50) to (16, 35) +## + +# mouse down to start selection +printf '\033}td;44;50;1;0;0\0' +# mouse move +printf '\033}tm;16;35;0\0' +# mouse up +printf '\033}tu;16;35;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tssh and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\0' + +## drag top-left corner to increase selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;13;35;1;0;0\0' +# mouse move +printf '\033}tm;2;35;0\0' +# mouse up +printf '\033}tu;2;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsfish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag top-left corner to decrease selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;3;35;1;0;0\0' +# mouse move +printf '\033}tm;12;35;0\0' +# mouse up +printf '\033}tu;12;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down-right corner to increase selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;46;50;1;0;0\0' +# mouse move +printf '\033}tm;57;50;0\0' +# mouse up +printf '\033}tu;57;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good will\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down right corner to decrease selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;58;50;1;0;0\0' +# mouse move +printf '\033}tm;43;50;0\0' +# mouse up +printf '\033}tu;43;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\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' +printf '\033}tr\0\033}tn\0' + + + + + +## +# Mouse selection from top-right to down-left +# (x:6,y:2) to (x:2, y:3) +# -> (44, 35) to (16, 50) +## + +# mouse down to start selection +printf '\033}td;44;35;1;0;0\0' +# mouse move +printf '\033}tm;16;50;0\0' +# mouse up +printf '\033}tu;16;50;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsnd the tyranny of evil men. Blessed is he who, in the name of charity and goo\0' + +## drag top-left corner to increase selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;13;35;1;0;0\0' +# mouse move +printf '\033}tm;2;35;0\0' +# mouse up +printf '\033}tu;2;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsfish and the tyranny of evil men. Blessed is he who, in the name of charity and goo\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag top-left corner to decrease selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;3;35;1;0;0\0' +# mouse move +printf '\033}tm;12;35;0\0' +# mouse up +printf '\033}tu;12;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and goo\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down-right corner to increase selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;46;50;1;0;0\0' +# mouse move +printf '\033}tm;57;50;0\0' +# mouse up +printf '\033}tu;57;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good will\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down right corner to decrease selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;58;50;1;0;0\0' +# mouse move +printf '\033}tm;43;50;0\0' +# mouse up +printf '\033}tu;43;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\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' +printf '\033}tr\0\033}tn\0' + +## +# Mouse selection from down-left to top-right +# (x:2,y:3) to (x:6, y:2) +# -> (16, 50) to (44, 35) +## +# mouse down to start selection +printf '\033}td;16;50;1;0;0\0' +# mouse move +printf '\033}tm;44;35;0\0' +# mouse up +printf '\033}tu;44;35;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsnd the tyranny of evil men. Blessed is he who, in the name of charity and goo\0' + + +## drag top-left corner to increase selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;13;35;1;0;0\0' +# mouse move +printf '\033}tm;2;35;0\0' +# mouse up +printf '\033}tu;2;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsfish and the tyranny of evil men. Blessed is he who, in the name of charity and goo\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag top-left corner to decrease selection +# set top left +printf '\033}tc;0;1\0' +# mouse down to start selection +printf '\033}td;3;35;1;0;0\0' +# mouse move +printf '\033}tm;12;35;0\0' +# mouse up +printf '\033}tu;12;35;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and goo\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down-right corner to increase selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;46;50;1;0;0\0' +# mouse move +printf '\033}tm;57;50;0\0' +# mouse up +printf '\033}tu;57;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good will\0' +# remove corners +printf '\033}tc;0;0\0\033}tc;1;0\0' +printf '\033}tr\0' + +## drag down right corner to decrease selection +# set top left +printf '\033}tc;1;1\0' +# mouse down to start selection +printf '\033}td;58;50;1;0;0\0' +# mouse move +printf '\033}tm;43;50;0\0' +# mouse up +printf '\033}tu;43;50;1;0;0\0' +# force render +printf '\033}tr\0' +# assert selection +printf '\033}tsish and the tyranny of evil men. Blessed is he who, in the name of charity and good wi\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' +printf '\033}tr\0\033}tn\0' diff --git a/tests/tests.results b/tests/tests.results index 917e04c..e2520d0 100644 --- a/tests/tests.results +++ b/tests/tests.results @@ -81,3 +81,4 @@ selection_simple.sh 6e1f48cd44beba3923e3e84ed4238dac selection_box_simple.sh 6e1f48cd44beba3923e3e84ed4238dac selection_all_directions.sh d52ca96d26bdc7b77cd815870c07195a selection_box_all_directions.sh d52ca96d26bdc7b77cd815870c07195a +selection_drag.sh d52ca96d26bdc7b77cd815870c07195a --
