summaryrefslogtreecommitdiff
path: root/tests/U_tests.json
diff options
context:
space:
mode:
authorNathan Gass2017-11-28 17:57:33 +0100
committerNathan Gass2017-11-28 17:57:33 +0100
commit208273360cc39c13870a73c82205a01d1c3b8a1a (patch)
tree1252142b3b0d5c6bc618064849eb0ba182991e96 /tests/U_tests.json
parent80157030ad338d7a207b163bb9c8e0716d9068b3 (diff)
downloaditools-208273360cc39c13870a73c82205a01d1c3b8a1a.tar.gz
itools-208273360cc39c13870a73c82205a01d1c3b8a1a.tar.bz2
itools-208273360cc39c13870a73c82205a01d1c3b8a1a.zip
test handling of empty parameters
Diffstat (limited to 'tests/U_tests.json')
-rw-r--r--tests/U_tests.json18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/U_tests.json b/tests/U_tests.json
index 3e1d092..d9c26f1 100644
--- a/tests/U_tests.json
+++ b/tests/U_tests.json
@@ -36,6 +36,24 @@
},
{
+ "args": ["/foo.html", {"bar": null}],
+ "exp": "/foo.html",
+ "name": "U() empty parameter removed"
+ },
+
+ {
+ "args": ["/foo.html?bar="],
+ "exp": "/foo.html",
+ "name": "U() empty parameter in base removed (1)"
+ },
+
+ {
+ "args": ["/foo.html?bar"],
+ "exp": "/foo.html",
+ "name": "U() empty parameter in base removed (2)"
+ },
+
+ {
"args": ["/foo.html", {"bar": {"gna": 42, "qux": {"quux": "<Zürich>", "gnöp": "fasel"}}}],
"exp": "/foo.html?bar[gna]=42&bar[qux][quux]=%3CZ%C3%BCrich%3E&bar[qux][gn%C3%B6p]=fasel",
"name": "U() with nested arrays"