summaryrefslogtreecommitdiff
path: root/t/headers-etag.t
blob: 5713f3d9861f09e1a9386ebb32005d9496901bf9 (plain)
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
use strict;
use warnings;

use Test::More;

plan tests => 4;

require HTTP::Headers::ETag;

my $h = HTTP::Headers->new;

$h->etag("tag1");
is($h->etag, qq("tag1"));

$h->etag("w/tag2");
is($h->etag, qq(W/"tag2"));

$h->if_match(qq(W/"foo", bar, baz), "bar");
$h->if_none_match(333);

$h->if_range("tag3");
is($h->if_range, qq("tag3"));

my $t = time;
$h->if_range($t);
is($h->if_range, $t);

note $h->as_string;