aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-12-28 17:41:33 +0100
committerBoris Faure <billiob@gmail.com>2018-12-28 17:41:33 +0100
commita940556cffa0f069014e690f5a00f453e60d163b (patch)
treee798aecc6335c35739a225e74d1c07f52124a9d0 /tests
parenttermptyesc: DECALN only reset margins and cursor position (diff)
downloadterminology-a940556cffa0f069014e690f5a00f453e60d163b.tar.gz
termpty: correctly handle wrap (DECAWM)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/decawm.sh49
-rw-r--r--tests/tests.results3
2 files changed, 51 insertions, 1 deletions
diff --git a/tests/decawm.sh b/tests/decawm.sh
new file mode 100755
index 0000000..1060754
--- /dev/null
+++ b/tests/decawm.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#set color
+printf '\033[46;31;3m'
+# fill space with E
+printf '\033#8'
+
+# set wrap mode
+printf '\033[?7h'
+# move to 1; 75
+printf '\033[1;75Habcdefghijkl'
+# reset wrap mode
+printf '\033[?7l'
+# move to 3; 75
+printf '\033[3;75Habcdefghijkl'
+
+
+# set top/bottom margins:
+printf '\033[10;20r'
+# allow left/right margins
+printf '\033[?69h'
+# set left/right margins:
+printf '\033[5;15s'
+# fill margin with @
+printf '\033[64;10;5;20;15$x'
+
+# set wrap mode
+printf '\033[?7h'
+# move
+printf '\033[12;12Habcdefghijkl'
+# reset wrap mode
+printf '\033[?7l'
+# move
+printf '\033[15;12Habcdefghijkl'
+
+
+# set left/right margins:
+printf '\033[25;35s'
+# fill margin with @
+printf '\033[64;10;25;20;35$x'
+# restrict cursor
+printf '\033[?6h'
+# set wrap mode
+printf '\033[?7h'
+# move
+printf '\033[2;5Habcdefghijkl'
+# reset wrap mode
+printf '\033[?7l'
+# move
+printf '\033[5;5Habcdefghijkl'
diff --git a/tests/tests.results b/tests/tests.results
index d99ef85..0991e2a 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -35,4 +35,5 @@ dch.sh 40cf655681c098251f0dc3e7733c4db9
cnl.sh 1f1512179c8e47e4bd880142774a3c66
cpl.sh 9145c88adb762a6a59c5bf69191b949e
cup.sh 11f5939a6cc990f6a7b9d1730ab3a8bf
-decaln.sh 38ca494fb468752d510daff797f7c40c
+decaln.sh 9c0cf4de336193bcdaed6ba6c0d6f590
+decawm.sh 84321e76f07b40cf9462238ec0919dc0