summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAlfred Morgan <alfred@54.org>2022-05-30 03:09:18 -0700
committerGitHub <noreply@github.com>2022-05-30 12:09:18 +0200
commit15f0b4867679120580b2f14bbb7a8b302505b34d (patch)
tree267ef5777ebd274ffc5b918c0465dfb2058c1bf7 /tests
parent497af2c0d9f311e050ba57842a6326ca70489d55 (diff)
downloadNim-15f0b4867679120580b2f14bbb7a8b302505b34d.tar.gz
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/turi.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/stdlib/turi.nim b/tests/stdlib/turi.nim
index a3b6afe2c..79ddd773b 100644
--- a/tests/stdlib/turi.nim
+++ b/tests/stdlib/turi.nim
@@ -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("./")