Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (56 sloc) 0.901 kB
use CGI::Header;
use Test::Base;
plan tests => 1 * blocks();
my $normalize = CGI::Header->can( '_normalize' );
run {
my $block = shift;
is $normalize->( $block->input ), $block->expected;
};
__DATA__
===
--- input: foo
--- expected: -foo
===
--- input: Foo
--- expected: -foo
===
--- input: foo-bar
--- expected: -foo_bar
===
--- input: Foo-bar
--- expected: -foo_bar
===
--- input: Foo-Bar
--- expected: -foo_bar
===
--- input: foo_bar
--- expected: -foo_bar
===
--- input: Foo_bar
--- expected: -foo_bar
===
--- input: Foo_Bar
--- expected: -foo_bar
===
--- input: Set-Cookie
--- expected: -set_cookie
===
--- input: Window-Target
--- expected: -window_target
===
--- input: P3P
--- expected: -p3p
===
--- input: Cookie
===
--- input: Cookies
===
--- input: Target
===
--- input: Attachment
===
--- input: Charset
===
--- input: NPH
===
--- input: Type
Jump to Line
Something went wrong with that request. Please try again.