summaryrefslogtreecommitdiff
path: root/alacritty_terminal/tests
diff options
context:
space:
mode:
authorKoichi Murase <myoga.murase@gmail.com>2019-08-07 07:59:16 +0900
committerChristian Duerr <contact@christianduerr.com>2019-08-06 22:59:16 +0000
commit33cfc52909bda1e2d5ceeae5397f254509d00539 (patch)
tree5c216e26de4c095058844cfab1ad18e7140157bd /alacritty_terminal/tests
parentb20d28578229a570b72f420fa50a64040bd2105b (diff)
downloadalacritty-33cfc52909bda1e2d5ceeae5397f254509d00539.tar.gz
alacritty-33cfc52909bda1e2d5ceeae5397f254509d00539.zip
Ignore unsupported CSI sequences
Instead of ignoring unexpected intermediates in CSI escape sequences, the intermediates are now explicitly checked and the escape sequence is rejected when an unexpected intermediate is found. Fixes #2171.
Diffstat (limited to 'alacritty_terminal/tests')
-rw-r--r--alacritty_terminal/tests/ref.rs1
-rw-r--r--alacritty_terminal/tests/ref/selective_erasure/alacritty.recording2
-rw-r--r--alacritty_terminal/tests/ref/selective_erasure/config.json1
-rw-r--r--alacritty_terminal/tests/ref/selective_erasure/grid.json1
-rw-r--r--alacritty_terminal/tests/ref/selective_erasure/size.json1
5 files changed, 6 insertions, 0 deletions
diff --git a/alacritty_terminal/tests/ref.rs b/alacritty_terminal/tests/ref.rs
index fb87adb1..b6efb6a8 100644
--- a/alacritty_terminal/tests/ref.rs
+++ b/alacritty_terminal/tests/ref.rs
@@ -53,6 +53,7 @@ ref_tests! {
grid_reset
row_reset
zerowidth
+ selective_erasure
}
fn read_u8<P>(path: P) -> Vec<u8>
diff --git a/alacritty_terminal/tests/ref/selective_erasure/alacritty.recording b/alacritty_terminal/tests/ref/selective_erasure/alacritty.recording
new file mode 100644
index 00000000..aae1560f
--- /dev/null
+++ b/alacritty_terminal/tests/ref/selective_erasure/alacritty.recording
@@ -0,0 +1,2 @@
+A[1"qB[2"qC[?2J
+A[1"qB[2"qC[?2K
diff --git a/alacritty_terminal/tests/ref/selective_erasure/config.json b/alacritty_terminal/tests/ref/selective_erasure/config.json
new file mode 100644
index 00000000..6fc49fd7
--- /dev/null
+++ b/alacritty_terminal/tests/ref/selective_erasure/config.json
@@ -0,0 +1 @@
+{"history_size":0} \ No newline at end of file
diff --git a/alacritty_terminal/tests/ref/selective_erasure/grid.json b/alacritty_terminal/tests/ref/selective_erasure/grid.json
new file mode 100644
index 00000000..08632f7d
--- /dev/null
+++ b/alacritty_terminal/tests/ref/selective_erasure/grid.json
@@ -0,0 +1 @@
+{"raw":{"inner":[{"inner":[{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]}],"occ":0},{"inner":[{"c":"A","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":"B","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":"C","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]}],"occ":3},{"inner":[{"c":"A","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":"B","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":"C","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]},{"c":" ","fg":{"Named":"Foreground"},"bg":{"Named":"Background"},"flags":{"bits":0},"extra":[" "," "," "," "," "]}],"occ":3}],"zero":0,"visible_lines":2,"len":3},"cols":10,"lines":3,"display_offset":0,"scroll_limit":0,"max_scroll_limit":0,"url_highlight":null} \ No newline at end of file
diff --git a/alacritty_terminal/tests/ref/selective_erasure/size.json b/alacritty_terminal/tests/ref/selective_erasure/size.json
new file mode 100644
index 00000000..58891d8a
--- /dev/null
+++ b/alacritty_terminal/tests/ref/selective_erasure/size.json
@@ -0,0 +1 @@
+{"width":70.0,"height":63.0,"cell_width":7.0,"cell_height":21.0,"padding_x":0.0,"padding_y":0.0,"dpr":1.0} \ No newline at end of file