1#!perl 2 3use strict; 4use warnings; 5use Test::More 'no_plan'; 6 7use CGI; 8 9my $q = CGI->new; 10my $CRLF = $MultipartBuffer::CRLF; 11 12like( 13 $q->multipart_start, 14 qr!^Content-Type: text/html$CRLF$CRLF$!, 15 'multipart_start with no args' 16); 17 18like( 19 $q->multipart_start( -type => 'text/plain' ), 20 qr!^Content-Type: text/plain$CRLF$CRLF$!, 21 'multipart_start with type' 22); 23 24like( 25 $q->multipart_start( -charset => 'utf-8' ), 26 qr!^Content-Type: text/html; charset=utf-8$CRLF$CRLF$!, 27 'multipart_start with charset' 28); 29 30like( 31 $q->multipart_start( -type => 'text/plain', -charset => 'utf-8' ), 32 qr!^Content-Type: text/plain; charset=utf-8$CRLF$CRLF$!, 33 'multipart_start with type and charset' 34); 35