added simple env test
[catagits/HTTP-Request-AsCGI.git] / t / 04io.t
CommitLineData
12852959 1#!perl
2
3use Test::More tests => 3;
4
5use strict;
6use warnings;
7
8use HTTP::Request;
9use HTTP::Request::AsCGI;
10
11my $r = HTTP::Request->new( POST => 'http://www.host.com/');
12$r->content('STDIN');
13$r->content_length(5);
14$r->content_type('text/plain');
15
16my $c = HTTP::Request::AsCGI->new($r)->setup;
17
18print STDOUT 'STDOUT';
19print STDERR 'STDERR';
20
21$c->restore;
22
23is( $c->stdin->getline, 'STDIN', 'STDIN' );
24is( $c->stdout->getline, 'STDOUT', 'STDOUT' );
25is( $c->stderr->getline, 'STDERR', 'STDERR' );