[master] dc0f151 Implement CSI-K, tweak tests.
Poul-Henning Kamp
phk at FreeBSD.org
Fri Jan 12 19:09:07 UTC 2018
commit dc0f151065a3f8a7bd23061b25bbc37685950a3c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Jan 12 19:07:53 2018 +0000
Implement CSI-K, tweak tests.
diff --git a/bin/varnishtest/tests/u00010.vtc b/bin/varnishtest/tests/u00010.vtc
index 59af38f..4822a78 100644
--- a/bin/varnishtest/tests/u00010.vtc
+++ b/bin/varnishtest/tests/u00010.vtc
@@ -18,4 +18,4 @@ client c1 {
rxresp
} -run
-process p1 -need-bytes 2000 -screen_dump -write {q} -wait
+process p1 -need-bytes 1000 -screen_dump -write {q} -wait
diff --git a/bin/varnishtest/tests/u00011.vtc b/bin/varnishtest/tests/u00011.vtc
index 8870b1a..378c22d 100644
--- a/bin/varnishtest/tests/u00011.vtc
+++ b/bin/varnishtest/tests/u00011.vtc
@@ -24,4 +24,4 @@ process p1 -writeln {quit}
process p1 -need-bytes 400
-process p1 -screen_dump -writeln {quit} -wait
+process p1 -screen_dump -write "quit\r" -wait
diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c
index 0325b94..9a06e95 100644
--- a/bin/varnishtest/vtc_process.c
+++ b/bin/varnishtest/vtc_process.c
@@ -714,10 +714,11 @@ cmd_process(CMD_ARGS)
u = strtoumax(av[1], NULL, 0);
av++;
do {
- usleep(100000);
+ usleep(500000);
AZ(pthread_mutex_lock(&p->mtx));
v = p->stdout_bytes;
AZ(pthread_mutex_unlock(&p->mtx));
+ vtc_log(p->vl, 4, "Have %ju bytes", v);
} while(v < u);
continue;
}
diff --git a/bin/varnishtest/vtc_term.c b/bin/varnishtest/vtc_term.c
index 6b89a03..a6309eb 100644
--- a/bin/varnishtest/vtc_term.c
+++ b/bin/varnishtest/vtc_term.c
@@ -119,6 +119,25 @@ term_escape(struct term *tp, int c, int n)
vtc_fatal(tp->vl, "ANSI J[%d]", tp->arg[0]);
term_clear(tp);
break;
+ case 'K':
+ // erase in line 0=right, 1=left, 2=full line
+ switch (tp->arg[0]) {
+ case 0:
+ for (i = tp->col + 1; i < tp->ncol; i++)
+ tp->vram[tp->line][i] = ' ';
+ break;
+ case 1:
+ for (i = 0; i < tp->col; i++)
+ tp->vram[tp->line][i] = ' ';
+ break;
+ case 2:
+ for (i = 0; i < tp->ncol; i++)
+ tp->vram[tp->line][i] = ' ';
+ break;
+ default:
+ vtc_fatal(tp->vl, "ANSI K[%d]", tp->arg[0]);
+ }
+ break;
case 'm':
// Ignore Graphic Rendition settings
break;
More information about the varnish-commit
mailing list