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