term-vt102 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ module Term
2
+ class VT102
3
+ VERSION = '0.9.1'
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'term/vt102/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "term-vt102"
8
+ spec.version = Term::VT102::VERSION
9
+ spec.authors = ["Mike Owens"]
10
+ spec.email = ["mike@filespanker.com"]
11
+ spec.summary = %q{VT102 terminal implementation}
12
+ spec.homepage = "https://github.com/mieko/term-vt102"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.5"
21
+ spec.add_development_dependency "rake"
22
+ spec.add_development_dependency "minitest", "~> 5.2"
23
+ end
@@ -0,0 +1,15 @@
1
+ # Make sure the VT102 module loads OK and can return its version number.
2
+ #
3
+ # Copyright (C) Mike Owens
4
+ # Copyright (C) Andrew Wood
5
+ # NO WARRANTY - see LICENSE.txt
6
+ #
7
+
8
+ require 'test_helper'
9
+ require 'term/vt102'
10
+
11
+ class TestLoad < TestBase
12
+ def test_that_it_has_a_version_number
13
+ refute_nil ::Term::VT102::VERSION
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ # Make sure the VT102 module can set its size OK.
2
+ #
3
+ # Copyright (C) Mike Owens
4
+ # Copyright (C) Andrew Wood
5
+ # NO WARRANTY - see LICENSE.txt
6
+ #
7
+
8
+ require 'test_helper'
9
+ require 'term/vt102'
10
+
11
+ class TestSetsize < TestBase
12
+ def test_sizes
13
+ assert_equal [80, 24], Term::VT102.new.size
14
+ assert_equal [ 1, 1], Term::VT102.new(cols: 1, rows: 1).size
15
+ assert_equal [80, 24], Term::VT102.new(cols: 80, rows: 24).size
16
+ assert_equal [80, 24], Term::VT102.new(cols: -1000, rows: -1000).size
17
+ end
18
+ end
@@ -0,0 +1,34 @@
1
+ # Make sure the VT102 module can process basic text OK.
2
+ #
3
+ # Copyright (C) Mike Owens
4
+ # Copyright (C) Andrew Wood
5
+ # NO WARRANTY - see LICENSE.txt
6
+ #
7
+
8
+ require 'test_helper'
9
+ require 'term/vt102'
10
+
11
+ class TestText < TestBase
12
+ def test_originals
13
+ assert_screens [
14
+ [ 10, 5, "line 1\r\n line 2\r\n line 3\r\nline 4",
15
+ "line 1" + ("\0" * 4),
16
+ " line 2" + ("\0" * 2),
17
+ " line 3" + ("\0" * 2),
18
+ "line 4" + ("\0" * 4),
19
+ ],
20
+ [ 80, 25, " line 1 \n line 2\n line 3\n line 4 ",
21
+ " line 1 " + ("\0" * 72),
22
+ ("\0" * 8) + " line 2" + ("\0" * 62),
23
+ ("\0" * 18) + " line 3" + ("\0" * 52),
24
+ ("\0" * 28) + " line 4 " + ("\0" * 44),
25
+ ],
26
+ [ 40, 5, "line 1\ttab 1\r\n line 2\ttab 2\ttab 3\r\n line 3\r\nline 4",
27
+ "line 1\0\0tab 1" + ("\0" * 27),
28
+ " line 2\0\0\0\0\0\0\0\0tab 2\0\0\0tab 3" + ("\0" * 11),
29
+ " line 3" + ("\0" * 32),
30
+ "line 4" + ("\0" * 34),
31
+ ],
32
+ ];
33
+ end
34
+ end
@@ -0,0 +1,73 @@
1
+ # Make sure the VT102 module can handle cursor positioning.
2
+ #
3
+ # Copyright (C) Mike Owens
4
+ # Copyright (C) Andrew Wood
5
+ # NO WARRANTY - see LICENSE.txt
6
+ #
7
+
8
+ require 'test_helper'
9
+ require 'term/vt102'
10
+
11
+ class TestCursor < TestBase
12
+ def test_originals
13
+ assert_screens [
14
+ [ 20, 5, "\e[2;4Hline 1\r\nline 2", # CUP - ESC [ y ; * H
15
+ "\0" * 20,
16
+ ("\0" * 3) + "line 1" + ("\0" * 11),
17
+ "line 2" + ("\0" * 14),
18
+ ],
19
+ [ 20, 5, "\e[3Hline 1\nline 2", # CUP - ESC [ y H
20
+ "\0" * 20,
21
+ "\0" * 20,
22
+ "line 1" + ("\0" * 14),
23
+ ("\0" * 6) + "line 2" + ("\0" * 8),
24
+ ],
25
+ [ 20, 5, "\e[2Hline 1\nline 2\e[1Hline 3", # CUP, CUP, LF
26
+ "line 3" + ("\0" * 14),
27
+ "line 1" + ("\0" * 14),
28
+ ("\0" * 6) + "line 2" + ("\0" * 8),
29
+ ],
30
+ [ 10, 4, "\e[2;6Hline 1\r\nline 2\eM\eMtop", # CUP, CR, LF, RI (ESC M)
31
+ ("\0" * 6) + "top" + "\0",
32
+ ("\0" * 5) + "line ",
33
+ "line 2" + ("\0" * 4),
34
+ ("\0" * 10),
35
+ ],
36
+ [ 20, 8, "\e[4;10Hmiddle\e[Htop line\eD" + # IND, NEL, CUU, CUF
37
+ "row 2\eE\rrow 3\e[A\e[8Cmark",
38
+ "top line" + ("\0" * 12),
39
+ ("\0" * 8) + "row 2mark" + ("\0" * 3),
40
+ "row 3" + ("\0" * 15),
41
+ ("\0" * 9) + "middle" + ("\0" * 5),
42
+ ],
43
+ [ 20, 4, "row 1\e[Brow 2\e[7Da\e[2Erow 4", # CUD, CUB, CNL
44
+ "row 1" + ("\0" * 15),
45
+ ("\0" * 3) + "a\0row 2" + ("\0" * 10),
46
+ "\0" * 20,
47
+ "row 4" + ("\0" * 15),
48
+ ],
49
+ [ 20, 4, "\e[3;4Hrow 3\e[2Frow 1" + # CPL, CHA, HPR, VPA
50
+ "\e[9Gmiddle 1\e[2aa\e[2db",
51
+ "row 1" + ("\0" * 3) + "middle 1" + ("\0" * 2) + "a\0",
52
+ ("\0" * 19) + "b",
53
+ ("\0" * 3) + "row 3" + ("\0" * 12),
54
+ ],
55
+ [ 20, 3, "\e[2erow 3\e[2;4frow 2\e[15\`mark", # VPR, HVP, HPA
56
+ ("\0" * 20),
57
+ ("\0" * 3) + "row 2" + ("\0" * 6) + "mark" + ("\0" * 2),
58
+ "row 3" + ("\0" * 15),
59
+ ],
60
+ [ 10, 5, "\e[999;999HR\e[GL\e[Hl\e[999Gr",
61
+ "l" + ("\0" * 8) + "r",
62
+ ("\0" * 10),
63
+ ("\0" * 10),
64
+ ("\0" * 10),
65
+ "L" + ("\0" * 8) + "R",
66
+ ],
67
+ [ 20, 8, "Trap\e[CLog\e[CDisplay", # reported by Paul Stoddard
68
+ "Trap\0Log\0Display" + ("\0" * 4),
69
+ ("\0" * 20),
70
+ ],
71
+ ]
72
+ end
73
+ end
@@ -0,0 +1,187 @@
1
+ # Make sure the VT102 module can handle scrolling up and down.
2
+ #
3
+ # Copyright (C) Mike Owens
4
+ # Copyright (C) Andrew Wood
5
+ # NO WARRANTY - see LICENSE.txt
6
+ #
7
+
8
+ require 'test_helper'
9
+ require 'term/vt102'
10
+
11
+ class TestScrolling < TestBase
12
+ def fill
13
+ "0123456789\r\n" +
14
+ "1234567890\r\n" +
15
+ "2345678901\r\n" +
16
+ "3456789012\e[H"
17
+ end
18
+
19
+ def fill2
20
+ "0123456789\r\n" +
21
+ "1234567890\r\n" +
22
+ "2345678901\r\n" +
23
+ "3456789012\e[2;3r\e[2H"
24
+ end
25
+
26
+ def test_00_nothing
27
+ assert_screen [
28
+ 10, 4, fill + "", # 1: nothing
29
+ "0123456789",
30
+ "1234567890",
31
+ "2345678901",
32
+ "3456789012" ]
33
+ end
34
+
35
+ def test_01_lf
36
+ assert_screen [
37
+ 10, 4, fill + "\e[4H\ntest", # 2: LF
38
+ "1234567890",
39
+ "2345678901",
40
+ "3456789012",
41
+ "test" + ("\0" * 6)]
42
+ end
43
+
44
+ def test_02_ri
45
+ assert_screen [
46
+ 10, 4, fill + "\eMtest", # 3: RI
47
+ "test" + ("\0" * 6),
48
+ "0123456789",
49
+ "1234567890",
50
+ "2345678901"]
51
+ end
52
+
53
+ def test_03_ind
54
+ assert_screen [
55
+ 10, 4, fill + "\e[4H\eDtest", # 4: IND
56
+ "1234567890",
57
+ "2345678901",
58
+ "3456789012",
59
+ "test" + ("\0" * 6)]
60
+ end
61
+
62
+ def test_04_nel
63
+ assert_screen [
64
+ 10, 4, fill + "\e[4H\eEtest", # 5: NEL
65
+ "1234567890",
66
+ "2345678901",
67
+ "3456789012",
68
+ "test" + ("\0" * 6)]
69
+ end
70
+
71
+ def test_05_cuu
72
+ assert_screen [
73
+ 10, 4, fill + "\e[2Atest", # 6: CUU
74
+ "test" + ("\0" * 6),
75
+ "\0" * 10,
76
+ "0123456789",
77
+ "1234567890"]
78
+ end
79
+
80
+ def test_06_cuu2
81
+ assert_screen [
82
+ 10, 4, fill + "\e[8Atest", # 7: CUU
83
+ "test" + ("\0" * 6),
84
+ "\0" * 10,
85
+ "\0" * 10,
86
+ "\0" * 10]
87
+ end
88
+
89
+ def test_07_cud
90
+ assert_screen [
91
+ 10, 4, fill + "\e[4H\e[2Btest", # 8: CUD
92
+ "2345678901",
93
+ "3456789012",
94
+ "\0" * 10,
95
+ "test" + ("\0" * 6)]
96
+ end
97
+
98
+ def test_08_cnl
99
+ assert_screen [
100
+ 10, 4, fill + "\e[4H\e[2Etest", # 9: CNL
101
+ "2345678901",
102
+ "3456789012",
103
+ "\0" * 10,
104
+ "test" + ("\0" * 6)]
105
+ end
106
+
107
+ def test_09_cnl2
108
+ assert_screen [
109
+ 10, 4, fill + "\e[4H\e[9Etest", # 10: CNL
110
+ "\0" * 10,
111
+ "\0" * 10,
112
+ "\0" * 10,
113
+ "test" + ("\0" * 6)]
114
+ end
115
+
116
+ def test_10_cpl
117
+ assert_screen [
118
+ 10, 4, fill + "\e[2Ftest", # 11: CPL
119
+ "test" + ("\0" * 6),
120
+ "\0" * 10,
121
+ "0123456789",
122
+ "1234567890"]
123
+ end
124
+
125
+ def test_11_nothing_decstbm
126
+ assert_screen [
127
+ 10, 4, fill2 + "", # 12: nothing (with DECSTBM)
128
+ "0123456789",
129
+ "1234567890",
130
+ "2345678901",
131
+ "3456789012"]
132
+ end
133
+
134
+ def test_12_decstbm_cnl
135
+ assert_screen [
136
+ 10, 4, fill2 + "\e[3H\e[Etest", # 13: DECSTBM CNL
137
+ "0123456789",
138
+ "2345678901",
139
+ "test" + ("\0" * 6),
140
+ "3456789012"]
141
+ end
142
+
143
+ def test_13_decstbm_cpl
144
+ assert_screen [
145
+ 10, 4, fill2 + "\e[Ftest", # 14: DECSTBM CPL
146
+ "0123456789",
147
+ "test" + ("\0" * 6),
148
+ "1234567890",
149
+ "3456789012"]
150
+ end
151
+
152
+ def test_14_decstbm_cnl2
153
+ assert_screen [
154
+ 10, 4, fill2 + "\e[3H\e[2Etest", # 15: DECSTBM CNL 2
155
+ "0123456789",
156
+ "\0" * 10,
157
+ "test" + ("\0" * 6),
158
+ "3456789012"]
159
+ end
160
+
161
+ def test_15_decstbm_cpl_2
162
+ assert_screen [
163
+ 10, 4, fill2 + "\e[2Ftest", # 16: DECSTBM CPL 2
164
+ "0123456789",
165
+ "test" + ("\0" * 6),
166
+ "\0" * 10,
167
+ "3456789012"]
168
+ end
169
+
170
+ def test_16_decstbm_cnl_4
171
+ assert_screen [
172
+ 10, 4, fill2 + "\e[3H\e[4Etest", # 17: DECSTBM CNL 4
173
+ "0123456789",
174
+ "\0" * 10,
175
+ "test" + ("\0" * 6),
176
+ "3456789012"]
177
+ end
178
+
179
+ def test_17_decstbm_cpl_4
180
+ assert_screen [
181
+ 10, 4, fill2 + "\e[4Ftest", # 18: DECSTBM CPL 4
182
+ "0123456789",
183
+ "test" + ("\0" * 6),
184
+ "\0" * 10,
185
+ "3456789012"]
186
+ end
187
+ end
@@ -0,0 +1,309 @@
1
+ # Make sure the VT102 module can handle line and character insertion and
2
+ # deletion, and line/screen clearing.
3
+ #
4
+ # Copyright (C) Mike Owens
5
+ # Copyright (C) Andrew Wood
6
+ # NO WARRANTY - see LICENSE.txt
7
+ #
8
+
9
+ require 'test_helper'
10
+ require 'term/vt102'
11
+
12
+ class TestInsdel < TestBase
13
+ def fill
14
+ "0123456789\r\n" +
15
+ "1234567890\r\n" +
16
+ "2345678901\r\n" +
17
+ "3456789012\e[H"
18
+ end
19
+
20
+ def test_00_nothing
21
+ assert_screen [
22
+ 10, 4, fill + "", # 1: nothing
23
+ "0123456789",
24
+ "1234567890",
25
+ "2345678901",
26
+ "3456789012"]
27
+ end
28
+
29
+ def test_01_dch_1
30
+ assert_screen [
31
+ 10, 4, fill + "\e[P", # 2: DCH 1
32
+ "123456789\0",
33
+ "1234567890",
34
+ "2345678901",
35
+ "3456789012"]
36
+ end
37
+
38
+ def test_02_dch_2
39
+ assert_screen [
40
+ 10, 4, fill + "\e[2;8H\e[2P", # 3: DCH 2
41
+ "0123456789",
42
+ "12345670\0\0",
43
+ "2345678901",
44
+ "3456789012"]
45
+ end
46
+
47
+ def test_03_dch_9
48
+ assert_screen [
49
+ 10, 4, fill + "\e[3;7H\e[9P", # 4: DCH 9
50
+ "0123456789",
51
+ "1234567890",
52
+ "234567\0\0\0\0",
53
+ "3456789012"]
54
+ end
55
+
56
+ def test_04_ech_1
57
+ assert_screen [
58
+ 10, 4, fill + "\e[X", # 5: ECH 1
59
+ "\0" + "123456789",
60
+ "1234567890",
61
+ "2345678901",
62
+ "3456789012"]
63
+ end
64
+
65
+ def test_05_ech_2
66
+ assert_screen [
67
+ 10, 4, fill + "\e[2;8H\e[2X", # 6: ECH 2
68
+ "0123456789",
69
+ "1234567\0\0" + "0",
70
+ "2345678901",
71
+ "3456789012"]
72
+ end
73
+
74
+ def test_06_ech_9
75
+ assert_screen [
76
+ 10, 4, fill + "\e[3;7H\e[9X", # 7: ECH 9
77
+ "0123456789",
78
+ "1234567890",
79
+ "234567\0\0\0\0",
80
+ "3456789012"]
81
+ end
82
+
83
+
84
+ def test_07_ich_1
85
+ assert_screen [
86
+ 10, 4, fill + "\e[@", # 8: ICH 1
87
+ "\0" + "012345678",
88
+ "1234567890",
89
+ "2345678901",
90
+ "3456789012"]
91
+ end
92
+
93
+ def test_08_ich_2
94
+ assert_screen [
95
+ 10, 4, fill + "\e[2;8H\e[2@", # 9: ICH 2
96
+ "0123456789",
97
+ "1234567\0\0" + "8",
98
+ "2345678901",
99
+ "3456789012"]
100
+ end
101
+
102
+ def test_09_ich_9
103
+ assert_screen [
104
+ 10, 4, fill + "\e[3;7H\e[9@", # 10: ICH 9
105
+ "0123456789",
106
+ "1234567890",
107
+ "234567\0\0\0\0",
108
+ "3456789012"]
109
+ end
110
+
111
+ def test_10_ed_0
112
+ assert_screen [
113
+ 10, 4, fill + "\e[2;4H\e[J", # 11: ED 0
114
+ "0123456789",
115
+ "123" + ("\0" * 7),
116
+ ("\0" * 10),
117
+ ("\0" * 10)]
118
+ end
119
+
120
+ def test_11_ed_1
121
+ assert_screen [
122
+ 10, 4, fill + "\e[2;4H\e[1J", # 12: ED 1
123
+ ("\0" * 10),
124
+ ("\0" * 4) + "567890",
125
+ "2345678901",
126
+ "3456789012"]
127
+ end
128
+
129
+ def test_12_ed_2
130
+ assert_screen [
131
+ 10, 4, fill + "\e[2;4H\e[2J", # 13: ED 2
132
+ ("\0" * 10),
133
+ ("\0" * 10),
134
+ ("\0" * 10),
135
+ ("\0" * 10)]
136
+ end
137
+
138
+ def test_13_el_0
139
+ assert_screen [
140
+ 10, 4, fill + "\e[2;4H\e[K", # 14: EL 0
141
+ "0123456789",
142
+ "123" + ("\0" * 7),
143
+ "2345678901",
144
+ "3456789012"]
145
+ end
146
+
147
+ def test_14_el_1
148
+ assert_screen [
149
+ 10, 4, fill + "\e[2;4H\e[1K", # 15: EL 1
150
+ "0123456789",
151
+ ("\0" * 4) + "567890",
152
+ "2345678901",
153
+ "3456789012"]
154
+ end
155
+
156
+ def test_15_el_2
157
+ assert_screen [
158
+ 10, 4, fill + "\e[2;4H\e[2K", # 16: EL 2
159
+ "0123456789",
160
+ ("\0" * 10),
161
+ "2345678901",
162
+ "3456789012"]
163
+ end
164
+
165
+ def test_16_il_1
166
+ assert_screen [
167
+ 10, 4, fill + "\e[2;4H\e[LAbC", # 17: IL 1
168
+ "0123456789",
169
+ ("\0" * 3) + "AbC" + ("\0" * 4),
170
+ "1234567890",
171
+ "2345678901"]
172
+ end
173
+
174
+ def test_17_il_2
175
+ assert_screen [
176
+ 10, 4, fill + "\e[2;4H\e[2LAbC", # 18: IL 2
177
+ "0123456789",
178
+ ("\0" * 3) + "AbC" + ("\0" * 4),
179
+ ("\0" * 10),
180
+ "1234567890"]
181
+ end
182
+
183
+ def test_18_il_3
184
+ assert_screen [
185
+ 10, 4, fill + "\e[2;4H\e[9LAbC", # 19: IL 3
186
+ "0123456789",
187
+ ("\0" * 3) + "AbC" + ("\0" * 4),
188
+ ("\0" * 10),
189
+ ("\0" * 10)]
190
+ end
191
+
192
+ def test_19_il_4
193
+ assert_screen [
194
+ 10, 4, fill + "\e[1;1H\e[2LAbC", # 20: IL 4
195
+ "AbC" + ("\0" * 7),
196
+ ("\0" * 10),
197
+ "0123456789",
198
+ "1234567890"]
199
+ end
200
+
201
+ def test_20_dl_1
202
+ assert_screen [
203
+ 10, 4, fill + "\e[2;4H\e[MAbC", # 21: DL 1
204
+ "0123456789",
205
+ "234AbC8901",
206
+ "3456789012",
207
+ ("\0" * 10)]
208
+ end
209
+
210
+ def test_21_dl_2
211
+ assert_screen [
212
+ 10, 4, fill + "\e[2;4H\e[2MAbC", # 22: DL 2
213
+ "0123456789",
214
+ "345AbC9012",
215
+ ("\0" * 10),
216
+ ("\0" * 10)]
217
+ end
218
+
219
+ def test_22_el_3
220
+ assert_screen [
221
+ 10, 4, fill + "\e[2;4H\e[9MAbC", # 23: DL 3
222
+ "0123456789",
223
+ ("\0" * 3) + "AbC" + ("\0" * 4),
224
+ ("\0" * 10),
225
+ ("\0" * 10)]
226
+ end
227
+
228
+ def test_23_dl_4
229
+ assert_screen [
230
+ 10, 4, fill + "\e[1;1H\e[2MAbC", # 24: DL 4
231
+ "AbC5678901",
232
+ "3456789012",
233
+ ("\0" * 10),
234
+ ("\0" * 10)]
235
+ end
236
+
237
+ def test_24_decstbm_il_1
238
+ assert_screen [
239
+ 10, 4, fill + "\e[2;3r\e[2;4H\e[LAbC", # 25: DECSTBM IL 1
240
+ "0123456789",
241
+ ("\0" * 3) + "AbC" + ("\0" * 4),
242
+ "1234567890",
243
+ "3456789012"]
244
+ end
245
+
246
+ def test_25_decstbm_il_2
247
+ assert_screen [
248
+ 10, 4, fill + "\e[2;3r\e[2;4H\e[2LAbC", # 26: DECSTBM IL 2
249
+ "0123456789",
250
+ ("\0" * 3) + "AbC" + ("\0" * 4),
251
+ ("\0" * 10),
252
+ "3456789012"]
253
+ end
254
+
255
+ def test_26_decstbm_il_3
256
+ assert_screen [
257
+ 10, 4, fill + "\e[2;3r\e[2;4H\e[9LAbC", # 27: DECSTBM IL 3
258
+ "0123456789",
259
+ ("\0" * 3) + "AbC" + ("\0" * 4),
260
+ ("\0" * 10),
261
+ "3456789012"]
262
+ end
263
+
264
+ def test_27_decstbm_il_4
265
+ assert_screen [
266
+ 10, 4, fill + "\e[2;3r\e[1;1H\e[2LAbC", # 28: DECSTBM IL 4
267
+ "AbC" + ("\0" * 7),
268
+ "1234567890",
269
+ "2345678901",
270
+ "3456789012"]
271
+ end
272
+
273
+ def test_28_decstbm_dl_1
274
+ assert_screen [
275
+ 10, 4, fill + "\e[2;3r\e[2;4H\e[MAbC", # 29: DECSTBM DL 1
276
+ "0123456789",
277
+ "234AbC8901",
278
+ ("\0" * 10),
279
+ "3456789012"]
280
+ end
281
+
282
+ def test_29_decstbm_dl_2
283
+ assert_screen [
284
+ 10, 4, fill + "\e[2;3r\e[2;4H\e[2MAbC", # 30: DECSTBM DL 2
285
+ "0123456789",
286
+ ("\0" * 3) + "AbC" + ("\0" * 4),
287
+ ("\0" * 10),
288
+ "3456789012"]
289
+ end
290
+
291
+ def test_30_decstbm_dl_3
292
+ assert_screen [
293
+ 10, 4, fill + "\e[2;3r\e[2;4H\e[9MAbC", # 31: DECSTBM DL 3
294
+ "0123456789",
295
+ ("\0" * 3) + "AbC" + ("\0" * 4),
296
+ ("\0" * 10),
297
+ "3456789012"]
298
+ end
299
+
300
+ def test_32_decstbm_dl_4
301
+ assert_screen [
302
+ 10, 4, fill + "\e[2;3r\e[1;1H\e[2MAbC", # 32: DECSTBM DL 4
303
+ "AbC" + ("\0" * 7),
304
+ "1234567890",
305
+ "2345678901",
306
+ "3456789012"]
307
+ end
308
+
309
+ end