aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-05 23:03:08 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-05 23:05:25 -0500
commit41cb10a3cb9261eb6d3b4f0579ade411d2de1a2d (patch)
tree8ae529a34b3a46475fca53665511f1a1765b512c
parent56253234aaf9fd2aad542acc14ef3637545d5249 (diff)
downloadvt100-rust-41cb10a3cb9261eb6d3b4f0579ade411d2de1a2d.tar.gz
vt100-rust-41cb10a3cb9261eb6d3b4f0579ade411d2de1a2d.zip
test subparameter behavior
-rw-r--r--tests/data/fixtures/colors.in3
-rw-r--r--tests/data/fixtures/colors/20.json8
-rw-r--r--tests/data/fixtures/colors/20.typescript1
-rw-r--r--tests/data/fixtures/colors/21.json21
-rw-r--r--tests/data/fixtures/colors/21.typescript1
-rw-r--r--tests/data/fixtures/colors/22.json31
-rw-r--r--tests/data/fixtures/colors/22.typescript1
7 files changed, 66 insertions, 0 deletions
diff --git a/tests/data/fixtures/colors.in b/tests/data/fixtures/colors.in
index 3b422fb..59da023 100644
--- a/tests/data/fixtures/colors.in
+++ b/tests/data/fixtures/colors.in
@@ -17,3 +17,6 @@ a\x1b[38;5;123mb\x1b[48;5;158mc
\x1bcfoo
\x1b[1;2H\x1b[41mo\x1b[m
\x1b[1;1H\x1b[41m\x1b[X\x1b[m
+\x1b[m\x1b[2J\x1b[H
+a\x1b[38:5:123mb\x1b[48:5:158mc
+\x1b[38:2:50:75:100md\x1b[48:2:125:150:175me
diff --git a/tests/data/fixtures/colors/20.json b/tests/data/fixtures/colors/20.json
new file mode 100644
index 0000000..bb83ae4
--- /dev/null
+++ b/tests/data/fixtures/colors/20.json
@@ -0,0 +1,8 @@
+{
+ "contents": "",
+ "cells": {},
+ "cursor_position": [
+ 0,
+ 0
+ ]
+} \ No newline at end of file
diff --git a/tests/data/fixtures/colors/20.typescript b/tests/data/fixtures/colors/20.typescript
new file mode 100644
index 0000000..c46ac5f
--- /dev/null
+++ b/tests/data/fixtures/colors/20.typescript
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/tests/data/fixtures/colors/21.json b/tests/data/fixtures/colors/21.json
new file mode 100644
index 0000000..a7a7ec6
--- /dev/null
+++ b/tests/data/fixtures/colors/21.json
@@ -0,0 +1,21 @@
+{
+ "contents": "abc",
+ "cells": {
+ "0,0": {
+ "contents": "a"
+ },
+ "0,1": {
+ "contents": "b",
+ "fgcolor": "123"
+ },
+ "0,2": {
+ "contents": "c",
+ "fgcolor": "123",
+ "bgcolor": "158"
+ }
+ },
+ "cursor_position": [
+ 0,
+ 3
+ ]
+} \ No newline at end of file
diff --git a/tests/data/fixtures/colors/21.typescript b/tests/data/fixtures/colors/21.typescript
new file mode 100644
index 0000000..b9ce486
--- /dev/null
+++ b/tests/data/fixtures/colors/21.typescript
@@ -0,0 +1 @@
+a[38:5:123mb[48:5:158mc \ No newline at end of file
diff --git a/tests/data/fixtures/colors/22.json b/tests/data/fixtures/colors/22.json
new file mode 100644
index 0000000..f4fa9fb
--- /dev/null
+++ b/tests/data/fixtures/colors/22.json
@@ -0,0 +1,31 @@
+{
+ "contents": "abcde",
+ "cells": {
+ "0,0": {
+ "contents": "a"
+ },
+ "0,1": {
+ "contents": "b",
+ "fgcolor": "123"
+ },
+ "0,2": {
+ "contents": "c",
+ "fgcolor": "123",
+ "bgcolor": "158"
+ },
+ "0,3": {
+ "contents": "d",
+ "fgcolor": "#324b64",
+ "bgcolor": "158"
+ },
+ "0,4": {
+ "contents": "e",
+ "fgcolor": "#324b64",
+ "bgcolor": "#7d96af"
+ }
+ },
+ "cursor_position": [
+ 0,
+ 5
+ ]
+} \ No newline at end of file
diff --git a/tests/data/fixtures/colors/22.typescript b/tests/data/fixtures/colors/22.typescript
new file mode 100644
index 0000000..32ab7e4
--- /dev/null
+++ b/tests/data/fixtures/colors/22.typescript
@@ -0,0 +1 @@
+[38:2:50:75:100md[48:2:125:150:175me \ No newline at end of file