avoid .git and dist files
[catagits/HTTP-Request-AsCGI.git] / t / deprecated / 04io.t
CommitLineData
9c216915 1#!perl
2
3use Test::More tests => 3;
4
5use strict;
6use warnings;
7
8use IO::File;
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
17my $c = HTTP::Request::AsCGI->new($r);
18$c->stderr(IO::File->new_tmpfile);
19$c->setup;
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' );