Skip to content

Commit

Permalink
Add tests with negative time
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-josef-spacek authored and oalders committed Jul 17, 2023
1 parent 5f94e28 commit 8786c34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Change history for HTTP-Date

- Add test with Time::Zone (GH#25) (Michal Josef Špaček)
- Add test with bad Time::Zone string (Michal Josef Špaček)
- Add tests with negative time (Michal Josef Špaček)

6.06 2023-07-06 22:29:55Z
- Use copyright year rather than range (GH#18) (Olaf Alders)
Expand Down
7 changes: 6 additions & 1 deletion t/date.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use strict;
use warnings;

use Test::More tests => 146;
use Test::More tests => 152;
use HTTP::Date;

# test str2time for supported dates. Test cases with 2 digit year
Expand Down Expand Up @@ -118,6 +118,11 @@ for (
'1980-01-01 00:61:00',
'1980-01-01 00:00:61',

# Negative time
'1880-01-01',
'Thu, 01 Jan 1880 00:00:00 GMT',
'01/Jan/1880:00:00:00 0000',

# Bad timezone string
'01 Jan 1994 02:00:00 BAD',
) {
Expand Down

0 comments on commit 8786c34

Please sign in to comment.