aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-12-30 18:36:02 +0100
committerBoris Faure <billiob@gmail.com>2018-12-30 18:36:27 +0100
commit12cc6aaf420d6aed856cfcad6404a1cb265db76b (patch)
tree0631543846ffbe77826c7814d6fc94630202a286 /tests
parenttermptyesc: DECCRARA/DECRARA when not in rectangle mode + tests (diff)
downloadterminology-12cc6aaf420d6aed856cfcad6404a1cb265db76b.tar.gz
termptyesc: support DECIC/DECDC + tests
Diffstat (limited to 'tests')
-rwxr-xr-xtests/decic-decdc.sh112
-rw-r--r--tests/tests.results1
2 files changed, 113 insertions, 0 deletions
diff --git a/tests/decic-decdc.sh b/tests/decic-decdc.sh
new file mode 100755
index 0000000..9c4ddf8
--- /dev/null
+++ b/tests/decic-decdc.sh
@@ -0,0 +1,112 @@
+#!/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;4m|'
+ printf '\033[0;1;4;7m\\'
+ printf '\033[0m~'
+ printf '\033[0;1m_'
+ printf '\033[0;31;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 color
+printf '\033[43;32;3m'
+
+# set top/bottom margins:
+printf '\033[3;20r'
+# allow left/right margins
+printf '\033[?69h'
+# set left/right margins:
+printf '\033[5;75s'
+
+
+#
+# INSERT
+#
+
+# move to
+printf '\033[2;2H'
+# insert column, outside margin, do nothing
+printf '\033[\047}'
+# move to
+printf '\033[2;8H'
+# insert column, outside margin, do nothing
+printf '\033[\047}'
+# move to
+printf '\033[5;2H'
+# insert column, outside margin, do nothing
+printf '\033[\047}'
+
+
+# move to
+printf '\033[10;12H'
+# insert column
+printf '\033[\047}'
+
+# move to
+printf '\033[10;17H'
+# insert 0 column (but 1 actually)
+printf '\033[0\047}'
+
+# move to
+printf '\033[10;21H'
+# insert 3 columns
+printf '\033[3\047}'
+
+
+#
+# DELETE
+#
+
+# move to
+printf '\033[2;78H'
+# insert column, outside margin, do nothing
+printf '\033[\047~'
+# move to
+printf '\033[10;78H'
+# insert column, outside margin, do nothing
+printf '\033[\047~'
+# move to
+printf '\033[2;60H'
+# insert column, outside margin, do nothing
+printf '\033[\047~'
+
+# move to
+printf '\033[10;50H'
+# delete column
+printf '\033[\047~'
+
+# move to
+printf '\033[10;55H'
+# delete 0 column (but 1 actually)
+printf '\033[0\047~'
+
+# move to
+printf '\033[10;60H'
+# delete 3 columns
+printf '\033[3\047~'
+
diff --git a/tests/tests.results b/tests/tests.results
index aeff779..a06e713 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -49,3 +49,4 @@ decrara-rectangular-no-restrict-cursor.sh be9836ff18eafb90795faecc042f34d6
decrara-rectangular-restrict-cursor.sh e98723f8f749e4902f7f4aaa677b85d6
decrara-no-rectangular-no-restrict-cursor.sh c375dd5d6538aff4c920b022f32f4ab0
decrara-no-rectangular-restrict-cursor.sh 815a848844cf7ea33d60e71948346a33
+decic-decdc.sh 6d67999a7c5c771281ff2229cdbdda76