/
10_normalization.t
67 lines (63 loc) · 1008 Bytes
/
10_normalization.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
use strict;
use warnings;
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
===
--- SKIP
--- input: Set-Cookie
--- expected: -cookie
===
--- input: Window-Target
--- expected: -target
===
--- input: P3P
--- expected: -p3p
===
--- input: cookie
--- expected:
===
--- input: target
--- expected:
===
--- input: attachment
--- expected:
===
--- input: charset
--- expected:
===
--- input: nph
--- expected:
===
--- input: type
--- expected: