billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=3b0a932d281b6635ffd3a513e634296c395b7f75

commit 3b0a932d281b6635ffd3a513e634296c395b7f75
Author: Boris Faure <[email protected]>
Date:   Mon Feb 18 22:06:41 2019 +0100

    tests: add some on triple-click selections
---
 tests/selection_triple_click.sh | 47 +++++++++++++++++++++++++++++++++++++++++
 tests/tests.results             |  1 +
 2 files changed, 48 insertions(+)

diff --git a/tests/selection_triple_click.sh b/tests/selection_triple_click.sh
new file mode 100755
index 0000000..485ff65
--- /dev/null
+++ b/tests/selection_triple_click.sh
@@ -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 u [...]
+
+# display text
+printf "%s\r\n%s\r\n%s" "$TEXT" "$TEXT" "$TEXT"
+
+#move to 18,0
+printf '\033[18H'
+printf "foo bar qux\r\nfoo bar qux"
+
+printf '\033[21H'
+printf "foo bar qux"
+printf '\033[21;50H'
+printf "foo bar qux"
+
+# force render
+printf '\033}tr\0'
+
+## full paragraph
+printf '\033}td;2;50;1;0;0\0'
+printf '\033}tu;2;50;1;0;0\0'
+printf '\033}td;2;50;1;0;1\0'
+printf '\033}tu;2;50;1;0;1\0'
+printf '\033}td;2;50;1;0;2\0'
+printf '\033}tu;2;50;1;0;2\0'
+# force render
+printf '\033}tr\0'
+# selection is
+printf '\033}ts%s\0' "$TEXT"
+# 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'
+
diff --git a/tests/tests.results b/tests/tests.results
index 56c064b..7239e9d 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -84,3 +84,4 @@ selection_box_all_directions.sh 
d52ca96d26bdc7b77cd815870c07195a
 selection_drag.sh d52ca96d26bdc7b77cd815870c07195a
 selection_box_drag.sh d52ca96d26bdc7b77cd815870c07195a
 selection_double_click.sh 8a9cd9ab55dacf0b2eef17d9bc57cd17
+selection_triple_click.sh 5b9bafc5802342ff3ee2bc6a8629cbe0

-- 


Reply via email to