Skip to content

Commit

Permalink
Merge pull request #700 from eserte/plack-runner-coverage
Browse files Browse the repository at this point in the history
increase test coverage for Plack::Runner::mangle_host_port_socket
  • Loading branch information
miyagawa authored Oct 10, 2023
2 parents ae1fb1d + 7b7cbef commit fa66e15
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/Plack-Runner/options.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ is_deeply p('-l', '10.0.0.1:80', '-l', 'unix.sock'),
{ host => '10.0.0.1', port => 80, listen => [ '10.0.0.1:80', 'unix.sock' ], socket => 'unix.sock' };
is_deeply p('-l', ':80', '--disable-foo', '--enable-bar'),
{ host => undef, port => 80, listen => [ ':80' ], socket => undef, foo => '', bar => 1 };
is_deeply p('-l', '10.0.0.1:80', '-l', '10.0.0.1:8080'),
{ host => '10.0.0.1', port => 80, listen => [ '10.0.0.1:80', '10.0.0.1:8080' ], socket => undef },
'host/port set from first --listen option';
is_deeply p('-l', 'foo.sock', '-l', 'unix.sock'),
{ host => undef, port => undef, listen => [ 'foo.sock', 'unix.sock' ], socket => 'unix.sock' },
'socket set from last --listen option';

{
my $r = Plack::Runner->new;
Expand Down

0 comments on commit fa66e15

Please sign in to comment.