Commit 6d405778 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Even more Teken coverage

parent 815e32a0
......@@ -7,6 +7,7 @@ process p4 {vttest} -start
process p4 -expect-text 21 11 "Enter choice number (0 - 12):"
process p4 -screen_dump
# 1. Test of cursor movements
process p4 -writehex "31 0d"
process p4 -expect-text 14 61 "RETURN"
process p4 -screen_dump
......@@ -37,6 +38,7 @@ process p4 -writehex 0d
process p4 -expect-text 21 11 "Enter choice number (0 - 12):"
process p4 -screen_dump
# 2. Test of screen features
process p4 -writehex "32 0d"
process p4 -expect-text 8 1 "Push <RETURN>"
process p4 -screen_dump
......@@ -104,6 +106,105 @@ process p4 -writehex 0d
process p4 -expect-text 21 11 "Enter choice number (0 - 12):"
process p4 -screen_dump
# 4. Test of double-sized characters
process p4 -writehex "34 0d"
process p4 -expect-text 21 1 "This is not a double-width line"
process p4 -expect-text 23 1 "Push <RETURN>"
process p4 -screen_dump
process p4 -writehex "0d"
process p4 -expect-text 21 1 "This **is** a double-width line"
process p4 -expect-text 23 1 "Push <RETURN>"
process p4 -screen_dump
process p4 -writehex "0d"
process p4 -expect-text 21 1 "This is not a double-width line"
process p4 -expect-text 23 1 "Push <RETURN>"
process p4 -screen_dump
process p4 -writehex "0d"
process p4 -expect-text 21 1 "This **is** a double-width line"
process p4 -expect-text 23 1 "Push <RETURN>"
process p4 -screen_dump
process p4 -writehex "0d"
delay 2
process p4 -expect-text 23 41 "Push <RETURN>"
process p4 -screen_dump
process p4 -writehex "0d"
delay 2
process p4 -expect-text 1 1 "Exactly half of the box should remain. Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 21 11 "Enter choice number (0 - 12):"
process p4 -screen_dump
# 8. Test of VT102 features (Insert/Delete Char/Line)
process p4 -writehex "38 0d"
process p4 -expect-text 4 1 "Screen accordion test (Insert & Delete Line). Push <RETURN>D"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 2 45 "nothing more. Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 4 59 "*B'. Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 4 52 "'AB'. Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 5 1 "by one. Push <RETURN>E"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 5 1 "by one. Push <RETURN>EEEEEEEEEEEEE "
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 10 1 "Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 4 1 "Screen accordion test (Insert & Delete Line). Push <RETURN>D"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 2 45 "nothing more. Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 4 59 "*B'. Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 4 52 "'AB'. Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 5 1 "by one. Push <RETURN>E"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 5 59 "EEE "
process p4 -expect-text 5 1 "by one. Push <RETURN>E"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 10 1 "Push <RETURN>"
process p4 -screen_dump
process p4 -writehex 0d
process p4 -expect-text 21 11 "Enter choice number (0 - 12):"
process p4 -screen_dump
# 0. Exit
process p4 -writehex "30 0d"
process p4 -expect-text 12 30 "That's all, folks!"
process p4 -screen_dump
......
......@@ -289,7 +289,7 @@ static void
term_expect_text(struct process *pp,
const char *lin, const char *col, const char *pat)
{
int x, y, l;
int x, y, l, d = 10000;
char *t;
y = strtoul(lin, NULL, 0);
......@@ -303,8 +303,10 @@ term_expect_text(struct process *pp,
"text at %d,%d: '%.*s'", y, x, l, t);
}
AZ(pthread_mutex_unlock(&pp->mtx));
usleep(1000000);
usleep(d);
AZ(pthread_mutex_lock(&pp->mtx));
if (d < 300000)
d += d;
}
AZ(pthread_mutex_unlock(&pp->mtx));
vtc_log(pp->vl, 4, "found expected text at %d,%d: '%s'", y, x, pat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment