summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason May <jason.a.may@gmail.com>2011-03-11 18:34:37 -0500
committerJesse Luehrs <doy@tozt.net>2011-04-14 01:19:03 -0500
commit877713e9442c55e11742cdb8573bf3c8753eb4cb (patch)
tree74a4e4b5bf69245d263ce9586e3aaf12cb44a4fc
parentccd85c2253dfccab755a22386a99050c8b078bf4 (diff)
downloadapp-termcast-877713e9442c55e11742cdb8573bf3c8753eb4cb.tar.gz
app-termcast-877713e9442c55e11742cdb8573bf3c8753eb4cb.zip
update tests for the immediate geometry update
-rw-r--r--t/01-basic.t8
-rw-r--r--t/02-read-write.t6
-rw-r--r--t/03-write-to-termcast.t6
3 files changed, 7 insertions, 13 deletions
diff --git a/t/01-basic.t b/t/01-basic.t
index 95e4059..f353c42 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -7,7 +7,7 @@ use IO::Pty::Easy;
BEGIN {
eval "use Test::TCP;";
plan skip_all => "Test::TCP is required for this test" if $@;
- plan tests => 4;
+ plan tests => 3;
}
test_tcp(
@@ -35,11 +35,9 @@ EOF
my $client = $sock->accept;
my $login;
$client->recv($login, 4096);
- is($login, "hello test tset\n", 'got the correct login info');
+ my $auth_regexp = qr/^hello test tset\n\e\[H\x00.+?\xff\e\[H\e\[2J/;
+ like($login, $auth_regexp, 'got the correct login info');
$client->send("hello, test\n");
- my $metadata;
- $client->recv($metadata, 4096);
- ok($metadata, 'metadata successfully sent');
my $output;
$client->recv($output, 4096);
is($output, "foo", 'sent the right data to the server');
diff --git a/t/02-read-write.t b/t/02-read-write.t
index f5ef179..5fd6baa 100644
--- a/t/02-read-write.t
+++ b/t/02-read-write.t
@@ -43,12 +43,10 @@ EOF
my $client = $sock->accept;
my $login;
$client->recv($login, 4096);
- is($login, "hello test tset\n", 'got the correct login info');
+ my $auth_regexp = qr/^hello test tset\n\e\[H\x00.+?\xff\e\[H\e\[2J/;
+ like($login, $auth_regexp, 'got the correct login info');
$client->send("hello, test\n");
- # skip over metadata - tested in 01-basic.t
- $client->recv(my $metadata, 4096);
-
my $output;
my $total_out = '';
while (1) {
diff --git a/t/03-write-to-termcast.t b/t/03-write-to-termcast.t
index 852c5f4..1e505f2 100644
--- a/t/03-write-to-termcast.t
+++ b/t/03-write-to-termcast.t
@@ -29,12 +29,10 @@ test_tcp(
my $client = $sock->accept;
my $login;
$client->recv($login, 4096);
- is($login, "hello test tset\n", 'got the correct login info');
+ my $auth_regexp = qr/^hello test tset\n\e\[H\x00.+?\xff\e\[H\e\[2J/;
+ like($login, $auth_regexp, 'got the correct login info');
$client->send("hello, test\n");
- # skip over metadata - tested in 01-basic.t
- $client->recv(my $metadata, 4096);
-
my $buf;
$client->recv($buf, 4096);
is($buf, 'foo', 'wrote correctly');