billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=923fa4a553634db0330bc63f9e98eac44ebb1e4e
commit 923fa4a553634db0330bc63f9e98eac44ebb1e4e Author: Boris Faure <[email protected]> Date: Sun Feb 24 16:20:03 2019 +0100 tests: add some on selection *to* paragraphs --- tests/selection_to_paragraph.sh | 169 ++++++++++++++++++++++++++++++++++++++++ tests/tests.results | 1 + 2 files changed, 170 insertions(+) diff --git a/tests/selection_to_paragraph.sh b/tests/selection_to_paragraph.sh new file mode 100755 index 0000000..12db973 --- /dev/null +++ b/tests/selection_to_paragraph.sh @@ -0,0 +1,169 @@ +#!/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 +TEXT1='Cras nec porttitor urna. Aliquam vel tellus ligula. In lacinia lorem neque, ac blandit purus sagittis sed. Nullam rhoncus feugiat felis, vel lobortis nunc varius eget. Cras tempor diam ut commodo imperdiet. Donec id odio dolor. Ut cursus mauris sed suscipit aliquam. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec ut diam ullamcorper, pellentesque libero nec, lobortis turpis. Praesent efficitur ipsum ut turpis elementum, in vestibulum augue suscipit. Donec digni [...] + +TEXT2='Mauris vulputate magna massa. Donec in magna mi. Aliquam feugiat vestibulum orci sed bibendum. Aenean ornare placerat arcu, eu blandit lacus feugiat sit amet. Phasellus lobortis cursus rutrum. Praesent pulvinar velit non maximus efficitur. Mauris non velit eget enim tempus sodales. Donec sodales lorem quis diam iaculis, vel finibus diam aliquam. In interdum faucibus eleifend. Proin pellentesque, nisi a congue euismod, nibh ipsum luctus diam, et iaculis elit arcu vel tellus.' + +TEXT3='Proin tristique sagittis ornare. Phasellus egestas aliquet euismod. Duis maximus lacinia erat, in sollicitudin sem interdum in. Fusce vel vulputate justo. Fusce lacinia sapien quis quam malesuada elementum. Phasellus consectetur bibendum mi, non tempus sem porttitor non. Sed neque velit, fringilla eget mollis in, pharetra quis augue. Nunc et tristique augue. Quisque volutpat arcu ut dictum euismod. Suspendisse quis rhoncus mauris, in congue ligula. Proin tristique nisl vel tempus [...] + +# display text +printf "%s\r\n%s\r\n%s" "$TEXT1" "$TEXT2" "$TEXT3" +# force render +printf '\033}tr\0' + + +## sel "top-down" to down +# mouse down to start selection +printf '\033}td;395;148;1;0;0\0' +# mouse move +printf '\033}tm;25;160;0\0' +# mouse up +printf '\033}tu;25;160;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsacus feugiat sit amet. Phase\0' +# To +# mouse move +printf '\033}tm;210;248;0\0' +# mouse triple-click with shift +printf '\033}td;210;248;1;2;2\0' +printf '\033}tu;210;248;1;2;2\0' +# selection is +printf '\033}ts%s\n%s\0' "$TEXT2" "$TEXT3" +# remove selection +printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0' +printf '\033}tr\0\033}tn\0' + + +## sel "top-down" to up +# mouse down to start selection +printf '\033}td;395;148;1;0;0\0' +# mouse move +printf '\033}tm;25;160;0\0' +# mouse up +printf '\033}tu;25;160;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsacus feugiat sit amet. Phase\0' +# To +# mouse move +printf '\033}tm;500;78;0\0' +# mouse triple-click with shift +printf '\033}td;500;78;1;2;2\0' +printf '\033}tu;500;78;1;2;2\0' +# selection is +printf '\033}ts%s\n%s\n\0' "$TEXT1" "$TEXT2" +# remove selection +printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0' +printf '\033}tr\0\033}tn\0' + + +## sel "top_down" to within selection +# mouse down to start selection +printf '\033}td;395;148;1;0;0\0' +# mouse move +printf '\033}tm;25;160;0\0' +# mouse up +printf '\033}tu;25;160;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsacus feugiat sit amet. Phase\0' +# To +# mouse move +printf '\033}tm;500;150;0\0' +# mouse triple-click with shift +printf '\033}td;500;150;1;2;2\0' +printf '\033}tu;500;150;1;2;2\0' +# selection is +printf '\033}ts%s\0' "$TEXT2" +# remove selection +printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0' +printf '\033}tr\0\033}tn\0' + + +## sel "down-top" to down +# mouse down to start selection +printf '\033}td;25;160;1;0;0\0' +# mouse move +printf '\033}tm;395;148;0\0' +# mouse up +printf '\033}tu;395;148;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsacus feugiat sit amet. Phase\0' +# To +# mouse move +printf '\033}tm;210;248;0\0' +# mouse triple-click with shift +printf '\033}td;210;248;1;2;2\0' +printf '\033}tu;210;248;1;2;2\0' +# selection is +printf '\033}ts%s\n%s\0' "$TEXT2" "$TEXT3" +# remove selection +printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0' +printf '\033}tr\0\033}tn\0' + + +## sel "down-top" to up +# mouse down to start selection +printf '\033}td;25;160;1;0;0\0' +# mouse move +printf '\033}tm;395;148;0\0' +# mouse up +printf '\033}tu;395;148;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsacus feugiat sit amet. Phase\0' +# To +# mouse move +printf '\033}tm;500;78;0\0' +# mouse triple-click with shift +printf '\033}td;500;78;1;2;2\0' +printf '\033}tu;500;78;1;2;2\0' +# selection is +printf '\033}ts%s\n%s\n\0' "$TEXT1" "$TEXT2" +# remove selection +printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0' +printf '\033}tr\0\033}tn\0' + + +## sel "down-top" to within +# mouse down to start selection +printf '\033}td;25;160;1;0;0\0' +# mouse move +printf '\033}tm;395;148;0\0' +# mouse up +printf '\033}tu;395;148;1;0;0\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsacus feugiat sit amet. Phase\0' +# To +# mouse move +printf '\033}tm;500;150;0\0' +# mouse triple-click with shift +printf '\033}td;500;150;1;2;2\0' +printf '\033}tu;500;150;1;2;2\0' +# selection is +printf '\033}ts%s\0' "$TEXT2" +# remove selection +printf '\033}td;0;0;1;0;0\0\033}tu;0;0;1;0;0\0' +printf '\033}tr\0\033}tn\0' diff --git a/tests/tests.results b/tests/tests.results index 833c08e..f5b8659 100644 --- a/tests/tests.results +++ b/tests/tests.results @@ -95,3 +95,4 @@ selection_over_multiple_lines.sh a8bd58ffa26d9f992c7736eb845a1677 selection_invisible.sh 198db7819804c4b34ad5f7fd2a71c420 selection_to_position.sh 0174fb1d413f19f32e68e31439335d97 selection_to_word.sh 0174fb1d413f19f32e68e31439335d97 +selection_to_paragraph.sh 7b918d2af64eef1ecb39a0f45cf72f2d --
