Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (24 sloc) 0.76 kB
use strict;
use warnings;
use CGI::Header;
use Test::More tests => 13;
my %adaptee;
tie my %adapter, 'CGI::Header', \%adaptee;
%adaptee = ();
is $adapter{Window_Target}, undef;
ok !exists $adapter{Window_Target};
is delete $adapter{Window_Target}, undef;
is_deeply \%adaptee, {};
%adaptee = ( -target => q{} );
is $adapter{Window_Target}, q{};
ok exists $adapter{Window_Target};
is delete $adapter{Window_Target}, q{};
is_deeply \%adaptee, {};
%adaptee = ( -target => 'ResultsWindow' );
is $adapter{Window_Target}, 'ResultsWindow';
ok exists $adapter{Window_Target};
is delete $adapter{Window_Target}, 'ResultsWindow';
is_deeply \%adaptee, {};
%adaptee = ();
$adapter{Window_Target} = 'ResultsWindow';
is_deeply \%adaptee, { -target => 'ResultsWindow' };
Jump to Line
Something went wrong with that request. Please try again.