From f571d1e6cb78d873b28248291e80076932ef98fc Mon Sep 17 00:00:00 2001 From: Jason May Date: Thu, 10 Mar 2011 12:21:08 -0500 Subject: update tests --- t/01-basic.t | 5 ++++- t/02-read-write.t | 4 ++++ t/03-write-to-termcast.t | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/t/01-basic.t b/t/01-basic.t index 73e0c26..95e4059 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 => 3; + plan tests => 4; } test_tcp( @@ -37,6 +37,9 @@ EOF $client->recv($login, 4096); is($login, "hello test tset\n", '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 4493873..f5ef179 100644 --- a/t/02-read-write.t +++ b/t/02-read-write.t @@ -45,6 +45,10 @@ EOF $client->recv($login, 4096); is($login, "hello test tset\n", '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 db9cfca..852c5f4 100644 --- a/t/03-write-to-termcast.t +++ b/t/03-write-to-termcast.t @@ -31,6 +31,10 @@ test_tcp( $client->recv($login, 4096); is($login, "hello test tset\n", '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'); -- cgit v1.2.3