aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-12-29 16:58:36 +0100
committerBoris Faure <billiob@gmail.com>2018-12-29 16:58:36 +0100
commit63911989fc12a9be9004295673a6c522531ead82 (patch)
treecb4fc0e9306754ed09eef7c349e9d06376f0e575 /tests
parenttermio: inverse colors only after applying bold/faint (more precise) (diff)
downloadterminology-63911989fc12a9be9004295673a6c522531ead82.tar.gz
termptyesc: handle deccara in its rectangular form + tests
Diffstat (limited to 'tests')
-rwxr-xr-xtests/deccara-rectangular-no-restrict-cursor.sh58
-rwxr-xr-xtests/deccara-rectangular-restrict-cursor.sh61
-rw-r--r--tests/tests.results2
3 files changed, 121 insertions, 0 deletions
diff --git a/tests/deccara-rectangular-no-restrict-cursor.sh b/tests/deccara-rectangular-no-restrict-cursor.sh
new file mode 100755
index 0000000..7e7f99f
--- /dev/null
+++ b/tests/deccara-rectangular-no-restrict-cursor.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# move to 0; 0
+printf '\033[H'
+# fill space
+PL=0
+for _ in $(seq 0 23); do
+ PL=$((PL+1))
+ if [ $PL -ge 9 ] ; then
+ PL=0
+ fi
+ for _ in $(seq 1 $PL); do
+ printf '#'
+ done
+ PR=$((10 - PL))
+ for _ in $(seq 0 6); do
+ printf '\033[0;1m\-'
+ printf '\033[0;46;1;4m/'
+ printf '\033[0;46;1;4;5m|'
+ printf '\033[0;1;4;5;7m\\'
+ printf '\033[0m~'
+ printf '\033[0;1;5m_'
+ printf '\033[0;31;5;7m>'
+ printf '\033[0;31;4;7m^'
+ printf '\033[0;1;7m<'
+ done
+ printf '\033[0m'
+ for _ in $(seq 1 $PR); do
+ printf '#'
+ done
+done
+
+# move to 0; 0
+printf '\033[H'
+
+# set top/bottom margins:
+printf '\033[5;20r'
+
+# force rectangular modifications
+printf '\033[2*x'
+
+# column reset
+printf '\033[1;10;80;15;0\044r'
+
+# column reset
+printf '\033[1;20;80;25;22;24;25;27\044r'
+
+# reset bold/blink
+printf '\033[1;30;80;35;22;25\044r'
+
+# set bold/underline, remove blink/reverse
+printf '\033[1;40;80;45;1;4;25;27\044r'
+
+# set blink/reverse, remove bold/underline
+printf '\033[1;50;80;55;5;7;22;24\044r'
+
+# set all, remove all
+printf '\033[1;60;80;65;1;4;5;7;0\044r'
diff --git a/tests/deccara-rectangular-restrict-cursor.sh b/tests/deccara-rectangular-restrict-cursor.sh
new file mode 100755
index 0000000..268962e
--- /dev/null
+++ b/tests/deccara-rectangular-restrict-cursor.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# move to 0; 0
+printf '\033[H'
+# fill space
+PL=0
+for _ in $(seq 0 23); do
+ PL=$((PL+1))
+ if [ $PL -ge 9 ] ; then
+ PL=0
+ fi
+ for _ in $(seq 1 $PL); do
+ printf '#'
+ done
+ PR=$((10 - PL))
+ for _ in $(seq 0 6); do
+ printf '\033[0;1m\-'
+ printf '\033[0;46;1;4m/'
+ printf '\033[0;46;1;4;5m|'
+ printf '\033[0;1;4;5;7m\\'
+ printf '\033[0m~'
+ printf '\033[0;1;5m_'
+ printf '\033[0;31;5;7m>'
+ printf '\033[0;31;4;7m^'
+ printf '\033[0;1;7m<'
+ done
+ printf '\033[0m'
+ for _ in $(seq 1 $PR); do
+ printf '#'
+ done
+done
+
+# move to 0; 0
+printf '\033[H'
+
+# set top/bottom margins:
+printf '\033[5;20r'
+
+# restrict cursor
+printf '\033[?6h'
+
+# force rectangular modifications
+printf '\033[2*x'
+
+# column reset
+printf '\033[1;10;80;15;0\044r'
+
+# column reset
+printf '\033[1;20;80;25;22;24;25;27\044r'
+
+# reset bold/blink
+printf '\033[1;30;80;35;22;25\044r'
+
+# set bold/underline, remove blink/reverse
+printf '\033[1;40;80;45;1;4;25;27\044r'
+
+# set blink/reverse, remove bold/underline
+printf '\033[1;50;80;55;5;7;22;24\044r'
+
+# set all, remove all
+printf '\033[1;60;80;65;1;4;5;7;0\044r'
diff --git a/tests/tests.results b/tests/tests.results
index f71bdb5..5b38bdc 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -41,3 +41,5 @@ decaln.sh 9c0cf4de336193bcdaed6ba6c0d6f590
decawm.sh 84321e76f07b40cf9462238ec0919dc0
decbi.sh 8153bff12a0d529cb8ba0dbff036a1ee
decfi.sh e93690447902b923d3d9d2ae72a31de4
+deccara-rectangular-no-restrict-cursor.sh 5f85e9992055397f951af7b5713fabde
+deccara-rectangular-restrict-cursor.sh c1d571a6c60a4fb06fdd81fee7c85e1c