Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
9bdc5f75
Commit
9bdc5f75
authored
Sep 24, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement and test ECMA-48 "REP" sequence.
Fixes: #2668
parent
0b965793
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
1 deletion
+37
-1
gensequences
bin/varnishtest/gensequences
+1
-0
sequences
bin/varnishtest/sequences
+3
-0
teken.h
bin/varnishtest/teken.h
+1
-0
teken_subr.h
bin/varnishtest/teken_subr.h
+11
-1
a00001.vtc
bin/varnishtest/tests/a00001.vtc
+21
-0
No files found.
bin/varnishtest/gensequences
View file @
9bdc5f75
...
...
@@ -158,6 +158,7 @@ for (p in l_prefix_name) {
if
(
l_prefix_name
[
p
]
!=
"teken_state_init"
)
{
print
""
;
print
"\tt->t_last = 0;"
;
print
"\tteken_state_switch(t, teken_state_init);"
;
}
print
"}"
;
...
...
bin/varnishtest/sequences
View file @
9bdc5f75
...
...
@@ -114,3 +114,6 @@ C25VTSW Cons25 switch virtual terminal ^[ [ z r
# VT52 compatibility
#DECID VT52 DECID ^[ Z
# ECMA-48
REP Repeat last graphic char ^[ [ b n
bin/varnishtest/teken.h
View file @
9bdc5f75
...
...
@@ -157,6 +157,7 @@ struct __teken {
unsigned
int
t_utf8_left
;
teken_char_t
t_utf8_partial
;
teken_char_t
t_last
;
unsigned
int
t_curscs
;
teken_scs_t
*
t_saved_curscs
;
...
...
bin/varnishtest/teken_subr.h
View file @
9bdc5f75
...
...
@@ -798,10 +798,11 @@ teken_subr_primary_device_attributes(const teken_t *t, unsigned int request)
}
static
void
teken_subr_do_putchar
(
const
teken_t
*
t
,
const
teken_pos_t
*
tp
,
teken_char_t
c
,
teken_subr_do_putchar
(
teken_t
*
t
,
const
teken_pos_t
*
tp
,
teken_char_t
c
,
int
width
)
{
t
->
t_last
=
c
;
if
(
t
->
t_stateflags
&
TS_INSERT
&&
tp
->
tp_col
<
t
->
t_winsize
.
tp_col
-
width
)
{
teken_rect_t
ctr
;
...
...
@@ -1334,3 +1335,12 @@ teken_subr_vertical_position_absolute(teken_t *t, unsigned int row)
t
->
t_stateflags
&=
~
TS_WRAPPED
;
teken_funcs_cursor
(
t
);
}
static
void
teken_subr_repeat_last_graphic_char
(
teken_t
*
t
,
unsigned
int
rpts
)
{
for
(;
t
->
t_last
!=
0
&&
rpts
>
0
;
rpts
--
)
teken_subr_regular_character
(
t
,
t
->
t_last
);
}
bin/varnishtest/tests/a00001.vtc
View file @
9bdc5f75
...
...
@@ -204,6 +204,27 @@ process p4 -writehex 0d
process p4 -expect-text 21 11 "Enter choice number (0 - 12):"
process p4 -screen_dump
# 11. Test non-VT100 (e.g., VT220, XTERM) terminals
process p4 -writehex "31 31 0d"
process p4 -expect-text 0 0 "Menu 11: Non-VT100 Tests"
process p4 -writehex "37 0d"
process p4 -expect-text 0 0 "Menu 11.7: Miscellaneous ISO-6429 (ECMA-48) Tests"
process p4 -writehex "32 0d"
process p4 -expect-text 0 0 "Push <RETURN>"
process p4 -screen_dump
process p4 -expect-text 20 1 "Test Repeat (REP)"
process p4 -expect-text 1 1 " ++ "
process p4 -expect-text 2 2 " ++ "
process p4 -expect-text 17 17 " ++ "
process p4 -expect-text 18 18 "*++*"
process p4 -writehex "0d"
process p4 -expect-text 0 0 "Menu 11.7: Miscellaneous ISO-6429 (ECMA-48) Tests"
process p4 -writehex "30 0d"
process p4 -expect-text 0 0 "Menu 11: Non-VT100 Tests"
process p4 -writehex "30 0d"
# 0. Exit
process p4 -writehex "30 0d"
process p4 -expect-text 12 30 "That's all, folks!"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment