From 208273360cc39c13870a73c82205a01d1c3b8a1a Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Tue, 28 Nov 2017 17:57:33 +0100 Subject: test handling of empty parameters --- tests/U_tests.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') 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 @@ -35,6 +35,24 @@ "name": "U() keeps #? at end" }, + { + "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": "", "gnöp": "fasel"}}}], "exp": "/foo.html?bar[gna]=42&bar[qux][quux]=%3CZ%C3%BCrich%3E&bar[qux][gn%C3%B6p]=fasel", -- cgit v1.2.3