Skip to content

Commit 4d056b9

Browse files
manwaroalders
authored andcommitted
Added test to check unrecognized options to parse().
1 parent 7bcc149 commit 4d056b9

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Change history for HTML-Form
44
- Perl::Tidy-ed the entire codebase (GH#42) (Julien Fiegehenn)
55
- Split extra packages inside HTML::Form into their own module files
66
and consolidate documentation (GH#43) (Julien Fiegehenn)
7+
- Added test to check unrecognized options to parse(). (GH#46) (Mohammad S Anwar)
78

89
6.10 2022-08-22 13:20:12Z
910
- Use "croak" instead of "die" to show errors from the perspective of the

t/form-parse.t

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!perl
2+
3+
use strict;
4+
use warnings;
5+
6+
use Test::More;
7+
use HTML::Form ();
8+
use Test::Warnings qw(warning);
9+
10+
$^W = 1;
11+
like(
12+
warning {
13+
HTML::Form->parse( q{}, base => 'http://localhost/', foo => 1 )
14+
},
15+
qr/^Unrecognized option foo in HTML::Form/,
16+
'caught invalid option to parse()',
17+
);
18+
19+
done_testing;

0 commit comments

Comments
 (0)