Zectbumo fixes 19824 (#19825)
* borrowed `$` to make Time string friendly * added sep character parameter * Revert "added sep character parameter" This reverts commit 45f4b019a4883b6ba577ade1f94677266beb5960. * added sep character parameter * Revert "borrowed `$` to make Time string friendly" This reverts commit 10e2e44c9a04970f38cf66556635bdbb50b69136. * added uri tests and made changelong entry * Update lib/pure/uri.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/pure/uri.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update tests/stdlib/turi.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update tests/stdlib/turi.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
This commit is contained in:
parent
497af2c0d9
commit
15f0b48676
3 changed files with 13 additions and 6 deletions
|
|
@ -274,7 +274,9 @@ template main() =
|
|||
doAssert encodeQuery({"foo": ""}) == "foo"
|
||||
doAssert encodeQuery({"foo": ""}, omitEq = false) == "foo="
|
||||
doAssert encodeQuery({"a": "1", "b": "", "c": "3"}) == "a=1&b&c=3"
|
||||
doAssert encodeQuery({"a": "1", "b": "", "c": "3"}, sep = ';') == "a=1;b;c=3"
|
||||
doAssert encodeQuery({"a": "1", "b": "", "c": "3"}, omitEq = false) == "a=1&b=&c=3"
|
||||
doAssert encodeQuery({"a": "1", "b": "", "c": "3"}, omitEq = false, sep = ';') == "a=1;b=;c=3"
|
||||
|
||||
block: # `?`
|
||||
block:
|
||||
|
|
@ -300,7 +302,9 @@ template main() =
|
|||
|
||||
block: # decodeQuery
|
||||
doAssert toSeq(decodeQuery("a=1&b=0")) == @[("a", "1"), ("b", "0")]
|
||||
doAssert toSeq(decodeQuery("a=1;b=0", sep = ';')) == @[("a", "1"), ("b", "0")]
|
||||
doAssert toSeq(decodeQuery("a=1&b=2c=6")) == @[("a", "1"), ("b", "2c=6")]
|
||||
doAssert toSeq(decodeQuery("a=1;b=2c=6", sep = ';')) == @[("a", "1"), ("b", "2c=6")]
|
||||
|
||||
block: # bug #17481
|
||||
let u1 = parseUri("./")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue