Navigation Menu

Skip to content

Commit

Permalink
a few more URL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 24, 2012
1 parent 3a8e353 commit 93904a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/mojo/url.t
Expand Up @@ -626,6 +626,17 @@ is $url->path->parts->[0], '100%_fun', 'right part';
is $url->path, '/100%25_fun', 'right path';
is "$url", 'http://mojolicio.us/100%25_fun', 'right format';

# No charset
$url = Mojo::URL->new;
$url->path->charset(undef);
$url->query->charset(undef);
$url->parse('http://foo.bar/%E4/?%E5=%E4');
is $url->scheme, 'http', 'right scheme';
is $url->host, 'foo.bar', 'right host';
is $url->path, '/%E4/', 'right path';
is $url->query, '%E5=%E4', 'right query';
is "$url", 'http://foo.bar/%E4/?%E5=%E4', 'right format';

# Resolve RFC 1808 examples
my $base = Mojo::URL->new('http://a/b/c/d?q#f');
$url = Mojo::URL->new('g');
Expand Down

0 comments on commit 93904a8

Please sign in to comment.