diff options
author | Christian A. Weber | 2017-08-18 17:38:49 +0200 |
---|---|---|
committer | Christian A. Weber | 2017-08-18 17:38:49 +0200 |
commit | 23986b65d683b5ec34822de198185b0571634767 (patch) | |
tree | b12638a89708210af566466c000993115fb129d7 /tests | |
parent | ceca2046210c8150f354e5b1e9dc97ff8cf28cb3 (diff) | |
download | itools-23986b65d683b5ec34822de198185b0571634767.tar.gz itools-23986b65d683b5ec34822de198185b0571634767.tar.bz2 itools-23986b65d683b5ec34822de198185b0571634767.zip |
U(): params can override base args, correctly add fragment to end of url if params are present, add some tests
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/it_html.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/it_html.t b/tests/it_html.t index 2dc7be5..538a350 100755 --- a/tests/it_html.t +++ b/tests/it_html.t @@ -190,6 +190,17 @@ is( ); is( + U("/foo.html?bar=qux", array('bar' => "baz")), + '/foo.html?bar=baz', + 'U() args override get params in base url' +); + +is( + U("/foo.html?bar=qux#frag=frog", array('baz' => "gna")), + '/foo.html?bar=qux&baz=gna#frag=frog', + 'U() fragment after params' +); +is( U("Jet d'eau"), 'Jet%20d%27eau', 'U() with single quotes in URL' @@ -197,7 +208,7 @@ is( is( U('/test.html?foo=bar?qux=gna', array('?q' => '?r')), - '/test.html?foo=bar%3Fqux=gna&%3Fq=%3Fr', + '/test.html?foo=bar%3Fqux%3Dgna&%3Fq=%3Fr', 'U() quoting of ? in args but not base' ); is( |