Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test tweaks
  • Loading branch information
kraih committed Mar 11, 2013
1 parent 41fa262 commit 3b76e5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
@@ -1 +1 @@
Please read the guide for [contributing to Mojolicious](http://mojolicio.us/perldoc/Mojolicious/Guides/Contributing).
Please read the guide for [contributing to Mojolicious](http://mojolicio.us/perldoc/Mojolicious/Guides/Contributing).
7 changes: 4 additions & 3 deletions t/mojo/parameters.t
Expand Up @@ -24,8 +24,9 @@ is "$params", 'foo=b%3Bar;baz=23', 'right format';
is_deeply $params->params, ['foo', 'b;ar', 'baz', 23], 'right structure';
$params->append(a => 4, a => 5, b => 6, b => 7);
is $params->to_string, "foo=b%3Bar;baz=23;a=4;a=5;b=6;b=7", 'right format';
push @$params, c => 8;
is $params->to_string, "foo=b%3Bar;baz=23;a=4;a=5;b=6;b=7;c=8", 'right format';
push @$params, c => 'f;oo';
is $params->to_string, "foo=b%3Bar;baz=23;a=4;a=5;b=6;b=7;c=f%3Boo",
'right format';

# Clone
my $clone = $params->clone;
Expand All @@ -35,7 +36,7 @@ isnt "$params", "$clone", 'unequal parameters';

# Merge
$params->merge($params2);
is $params->to_string, 'foo=b%3Bar;baz=23;a=4;a=5;b=6;b=7;c=8;x=1;y=2',
is $params->to_string, 'foo=b%3Bar;baz=23;a=4;a=5;b=6;b=7;c=f%3Boo;x=1;y=2',
'right format';
is $params2->to_string, 'x=1&y=2', 'right format';

Expand Down
4 changes: 2 additions & 2 deletions t/mojo/path.t
Expand Up @@ -29,8 +29,8 @@ is $path->[1], undef, 'no part';
ok $path->leading_slash, 'has leading slash';
ok !$path->trailing_slash, 'no trailing slash';
is "$path", '/AZaz09-._~!$&\'()*+,;=:@', 'right path';
push @$path, 'foo';
is "$path", '/AZaz09-._~!$&\'()*+,;=:@/foo', 'right path';
push @$path, 'f/oo';
is "$path", '/AZaz09-._~!$&\'()*+,;=:@/f%2Foo', 'right path';

# Unicode
is $path->parse('/foo/♥/bar')->to_string, '/foo/%E2%99%A5/bar', 'right path';
Expand Down

0 comments on commit 3b76e5d

Please sign in to comment.