diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-06-16 06:44:29 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-06-16 06:44:29 +0000 |
commit | f9f3ab3056d94292adb4ab2e1451645bee989769 (patch) | |
tree | cc5a62954d359d5aad449420bc7ec259b3edb79e /t/headers/target.t | |
download | CGI-tarball-master.tar.gz |
Diffstat (limited to 't/headers/target.t')
-rw-r--r-- | t/headers/target.t | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/headers/target.t b/t/headers/target.t new file mode 100644 index 0000000..96c95d1 --- /dev/null +++ b/t/headers/target.t @@ -0,0 +1,22 @@ +use strict; +use CGI; +use Test::More; + +{ + my $cgi = CGI->new; + my $got = $cgi->header( -target => 'ResultsWindow' ); + my $expected = "Window-Target: ResultsWindow$CGI::CRLF" + . 'Content-Type: text/html; charset=ISO-8859-1' + . $CGI::CRLF x 2; + is $got, $expected, 'target'; +} + +{ + my $cgi = CGI->new; + my $got = $cgi->header( -target => q{} ); + my $expected = 'Content-Type: text/html; charset=ISO-8859-1' + . $CGI::CRLF x 2; + is $got, $expected, 'target empty string'; +} + +done_testing; |