From 1dc82f91f1093a1b15e94d6c323085f890d295d2 Mon Sep 17 00:00:00 2001 From: openstrike Date: Tue, 18 Jul 2017 23:00:19 +0100 Subject: [PATCH] Add test for issue 78 (which does not produce the reported behaviour) --- t/headers.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/headers.t b/t/headers.t index ef86f640..3192280d 100644 --- a/t/headers.t +++ b/t/headers.t @@ -3,7 +3,7 @@ use warnings; use Test::More; -plan tests => 168; +plan tests => 172; my($h, $h2); sub j { join("|", @_) } @@ -171,7 +171,7 @@ like($h->header("Date"), qr/^[A-Z][a-z][a-z], \d\d .* GMT$/); } if ($] < 5.006) { - Test::skip("Can't call variable method", 1) for 1..13; + Test::skip("Can't call variable method", 1) for 1..17; } else { # other date fields @@ -182,6 +182,7 @@ for my $field (qw(expires if_modified_since if_unmodified_since is($h->$field, undef); is($h->$field(time), undef); like((time - $h->$field), qr/^[01]$/); + ok($h->$field('not an int')); EOT } is(j($h->header_field_names), "Date|If-Modified-Since|If-Unmodified-Since|Expires|Last-Modified");