summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/17state_mouse.test10
-rw-r--r--t/25state_input.test2
-rw-r--r--t/30state_pen.test8
-rw-r--r--t/40state_selection.test24
-rw-r--r--t/harness.c5
5 files changed, 48 insertions, 1 deletions
diff --git a/t/17state_mouse.test b/t/17state_mouse.test
index e5ba29b..33b7dc2 100644
--- a/t/17state_mouse.test
+++ b/t/17state_mouse.test
@@ -55,6 +55,10 @@ MOUSEBTN d 4 0
output "\e[M\x60\x36\x2b"
MOUSEBTN d 5 0
output "\e[M\x61\x36\x2b"
+MOUSEBTN d 6 0
+ output "\e[M\x62\x36\x2b"
+MOUSEBTN d 7 0
+ output "\e[M\x63\x36\x2b"
!DECRQM on mouse button mode
PUSH "\e[?1000\$p"
@@ -179,3 +183,9 @@ RESET
MOUSEMOVE 0,0 0
MOUSEBTN d 1 0
MOUSEBTN u 1 0
+
+!DECSM can set multiple modes at once
+PUSH "\e[?1002;1006h"
+ settermprop 8 2
+MOUSEBTN d 1 0
+ output "\e[<0;1;1M"
diff --git a/t/25state_input.test b/t/25state_input.test
index 4eb4c6a..11013ed 100644
--- a/t/25state_input.test
+++ b/t/25state_input.test
@@ -148,7 +148,9 @@ FOCUS IN
FOCUS OUT
!Focus reporting enabled
+WANTSTATE +p
PUSH "\e[?1004h"
+ settermprop 9 true
FOCUS IN
output "\e[I"
FOCUS OUT
diff --git a/t/30state_pen.test b/t/30state_pen.test
index 92cf01d..1a6cd01 100644
--- a/t/30state_pen.test
+++ b/t/30state_pen.test
@@ -123,3 +123,11 @@ PUSH "\e[74m"
PUSH "\e[75m"
?pen small = off
?pen baseline = normal
+
+!DECSTR resets pen attributes
+PUSH "\e[1;4m"
+ ?pen bold = on
+ ?pen underline = 1
+PUSH "\e[!p"
+ ?pen bold = off
+ ?pen underline = 0
diff --git a/t/40state_selection.test b/t/40state_selection.test
index ccc3d92..03dd183 100644
--- a/t/40state_selection.test
+++ b/t/40state_selection.test
@@ -26,6 +26,30 @@ PUSH "\e]52;c;SGVsbG"
PUSH "8s\e\\"
selection-set mask=0001 "lo,"]
+!Set clipboard; empty first chunk
+PUSH "\e]52;c;"
+PUSH "SGVsbG8s\e\\"
+ selection-set mask=0001 ["Hello,"]
+
+!Set clipboard; empty final chunk
+PUSH "\e]52;c;SGVsbG8s"
+ selection-set mask=0001 ["Hello,"
+PUSH "\e\\"
+ selection-set mask=0001 ]
+
+!Set clipboard; longer than buffer
+PUSH "\e]52;c;" . "LS0t"x10 . "\e\\"
+ selection-set mask=0001 ["-"x15
+ selection-set mask=0001 "-"x15]
+
+!Clear clipboard
+PUSH "\e]52;c;\e\\"
+ selection-set mask=0001 []
+
+!Set invalid data clears and ignores
+PUSH "\e]52;c;SGVs*SGVsbG8s\e\\"
+ selection-set mask=0001 []
+
!Query clipboard
PUSH "\e]52;c;?\e\\"
selection-query mask=0001
diff --git a/t/harness.c b/t/harness.c
index 0003e1b..ddd5917 100644
--- a/t/harness.c
+++ b/t/harness.c
@@ -657,7 +657,10 @@ int main(int argc, char **argv)
if(!state) {
state = vterm_obtain_state(vt);
vterm_state_set_callbacks(state, &state_cbs, NULL);
- vterm_state_set_selection_callbacks(state, &selection_cbs, NULL, NULL, 1024);
+ /* In some tests we want to check the behaviour of overflowing the
+ * buffer, so make it nicely small
+ */
+ vterm_state_set_selection_callbacks(state, &selection_cbs, NULL, NULL, 16);
vterm_state_set_bold_highbright(state, 1);
vterm_state_reset(state, 1);
}