aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-12-09 17:46:14 +0100
committerBoris Faure <billiob@gmail.com>2018-12-27 22:14:44 +0100
commitfeb7495fbb9a221367d77f39da3557dd74fa1d14 (patch)
tree9545327c894749d3b7b7782c8908e31a900f2b53 /tests
parenttermptyesc: act like xterm, do not report title/icon-name (diff)
downloadterminology-feb7495fbb9a221367d77f39da3557dd74fa1d14.tar.gz
termptyesc: DSR-CPR takes cursor restriction into account + test
Diffstat (limited to 'tests')
-rwxr-xr-xtests/dsr-cpr.sh40
-rw-r--r--tests/tests.results1
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/dsr-cpr.sh b/tests/dsr-cpr.sh
new file mode 100755
index 0000000..b08c03b
--- /dev/null
+++ b/tests/dsr-cpr.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# fill space with E
+printf '\033#8'
+#set color
+printf '\033[46;31;3m'
+
+# cursor to 7,4
+printf '\033[7;4H'
+# Request cursor position
+printf '\033[6n'
+# Request cursor position (dec)
+printf '\033[?6n'
+
+sleep 1
+
+# set top/bottom margins:
+printf '\033[10;20r'
+# allow left/right margins
+printf '\033[?69h'
+# set left/right margins:
+printf '\033[5;15s'
+
+# cursor to 17,14
+printf '\033[17;14H'
+
+# Request cursor position
+printf '\033[6n'
+# Request cursor position (dec)
+printf '\033[?6n'
+
+sleep 1
+
+# restrict cursor
+printf '\033[?6h'
+
+# Request cursor position
+printf '\033[6n'
+# Request cursor position (dec)
+printf '\033[?6n'
diff --git a/tests/tests.results b/tests/tests.results
index c9a8fe1..9bad340 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -17,3 +17,4 @@ tabs.sh 960b74686e23e8e39c3446768b9efc75
xterm-osc-0-title-icon.sh cb5080cc1dbc23b553b62fbdc8cbdf68
xterm-osc-1-icon.sh 9202db6e81ce810f007035770934fecb
xterm-osc-2-title.sh 49a058f1813bdd64faab1cf1af3ebe09
+dsr-cpr.sh 5a778fd856455475e695e5469e69d227