billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=78fac60c59dff900756df1482f494ac0cc9e9c7c
commit 78fac60c59dff900756df1482f494ac0cc9e9c7c Author: Boris Faure <[email protected]> Date: Wed Apr 1 00:00:01 2020 +0200 tests: add test on link detection with emails being surrounded --- tests/link_detection_email_surrounded.sh | 154 +++++++++++++++++++++++++++++++ tests/tests.results | 1 + 2 files changed, 155 insertions(+) diff --git a/tests/link_detection_email_surrounded.sh b/tests/link_detection_email_surrounded.sh new file mode 100755 index 0000000..29e8ae9 --- /dev/null +++ b/tests/link_detection_email_surrounded.sh @@ -0,0 +1,154 @@ +#!/bin/sh + +# reset screen +printf '\033[2J' +# set color +printf '\033[46;31;3m' + +# move to 2; 0 +printf '\033[2;2H' + +# positions when over links +printf ' o u ' +printf '\033}td;27;25;1;0;1\0' +printf '\033}tu;27;25;1;0;1\0' +printf '\033}td;27;25;1;0;1\0' +printf '\033}tu;27;25;1;0;1\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tso\0' +printf '\033}td;170;26;1;0;1\0' +printf '\033}tu;170;26;1;0;1\0' +printf '\033}td;170;26;1;0;1\0' +printf '\033}tu;170;26;1;0;1\0' +# force render +printf '\033}tr\0' +# selection is +printf '\033}tsu\0' + +## surrounded by spaces +# move to 3; 2 +printf '\033[3;2H' +printf ' [email protected] [email protected] ' +# mouse move +printf '\033}tm;27;40\0' +# email detection on 'f' +printf '\033}tle;2;2;12;2;[email protected]\0' +# mouse move +printf '\033}tm;170;40\0' +# email detection on 'u' +printf '\033}tle;19;2;29;2;[email protected]\0' + + +## surrounded by double quotes +# move to 4; 2 +printf '\033[4;2H' +printf '"[email protected]" "[email protected]"' +# mouse move +printf '\033}tm;27;55\0' +# email detection on 'f' +printf '\033}tle;2;3;12;3;[email protected]\0' +# mouse move +printf '\033}tm;170;55\0' +# email detection on 'u' +printf '\033}tle;19;3;29;3;[email protected]\0' + + +## surrounded by single quotes +# move to 5; 2 +printf '\033[5;2H' +printf '\[email protected]\047 \[email protected]\047' +# mouse move +printf '\033}tm;27;70\0' +# email detection on 'f' +printf '\033}tle;2;4;12;4;[email protected]\0' +# mouse move +printf '\033}tm;170;70\0' +# email detection on 'u' +printf '\033}tle;19;4;29;4;[email protected]\0' + + +## surrounded by backticks +# move to 6; 2 +printf '\033[6;2H' +printf '\[email protected]\140 \[email protected]\140' +# mouse move +printf '\033}tm;27;85\0' +# email detection on 'f' +printf '\033}tle;2;5;12;5;[email protected]\0' +# mouse move +printf '\033}tm;170;85\0' +# email detection on 'u' +printf '\033}tle;19;5;29;5;[email protected]\0' + + +## surrounded by angle brackets +# move to 7; 2 +printf '\033[7;2H' +printf '<[email protected]> <[email protected]>' +# mouse move +printf '\033}tm;27;100\0' +# email detection on 'f' +printf '\033}tle;2;6;12;6;[email protected]\0' +# mouse move +printf '\033}tm;170;100\0' +# email detection on 'u' +printf '\033}tle;19;6;29;6;[email protected]\0' + + +## surrounded by square brackets +# move to 8; 2 +printf '\033[8;2H' +printf '[[email protected]] [[email protected]]' +# mouse move +printf '\033}tm;27;115\0' +# email detection on 'f' +printf '\033}tle;2;7;12;7;[email protected]\0' +# mouse move +printf '\033}tm;170;115\0' +# email detection on 'u' +printf '\033}tle;19;7;29;7;[email protected]\0' + + +## surrounded by curly brackets +# move to 9; 2 +printf '\033[9;2H' +printf '{[email protected]} {[email protected]}' +# mouse move +printf '\033}tm;27;130\0' +# email detection on 'f' +printf '\033}tle;2;8;12;8;[email protected]\0' +# mouse move +printf '\033}tm;170;130\0' +# email detection on 'u' +printf '\033}tle;19;8;29;8;[email protected]\0' + + +## surrounded by parentheses +# move to 10; 2 +printf '\033[10;2H' +printf '([email protected]) ([email protected])' +# mouse move +printf '\033}tm;27;145\0' +# email detection on 'f' +printf '\033}tle;2;9;12;9;[email protected]\0' +# mouse move +printf '\033}tm;170;145\0' +# email detection on 'u' +printf '\033}tle;19;9;29;9;[email protected]\0' + + +## surrounded by pipes +# move to 11; 2 +printf '\033[11;2H' +printf '|[email protected]| |[email protected]|' +# mouse move +printf '\033}tm;27;160\0' +# email detection on 'f' +printf '\033}tle;2;10;12;10;[email protected]\0' +# mouse move +printf '\033}tm;170;160\0' +# email detection on 'u' +printf '\033}tle;19;10;29;10;[email protected]\0' +exit 0 diff --git a/tests/tests.results b/tests/tests.results index a5e408f..ed7c1b0 100644 --- a/tests/tests.results +++ b/tests/tests.results @@ -127,3 +127,4 @@ title_icon_stack_simple.sh 9231de4459dbb52d0ffab6f33fc386a0 title_icon_stack_unset.sh d2ebe2295eb036d9612209490f8aa7f9 title_icon_stack_default.sh d2ebe2295eb036d9612209490f8aa7f9 zero-width-spaces.sh 4bbf6bbaef5f651d27b7593d82650de9 +link_detection_email_surrounded.sh cb14f5c5601c045507220db6b503b1f2 --
