summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorBenoit Favre <benoit.favre@gmail.com>2021-02-16 20:20:37 +0100
committerGitHub <noreply@github.com>2021-02-16 20:20:37 +0100
commit81703d4ad4c7dd5746f67947371bdef5a38b2ad7 (patch)
tree8fc6fa9b701475b52fcc31506442699c1680679d /tests
parentb187caeb87602975642a589ea39b706a56e5c830 (diff)
downloadNim-81703d4ad4c7dd5746f67947371bdef5a38b2ad7.tar.gz
Fix bug in removeDotSegments: added test (#17050)
* Fix bug in removeDotSegments when path ends with dot

* Add test for trailing period bug in uri
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/turi.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/stdlib/turi.nim b/tests/stdlib/turi.nim
index 1abab7a19..07f3f17f8 100644
--- a/tests/stdlib/turi.nim
+++ b/tests/stdlib/turi.nim
@@ -174,6 +174,7 @@ template main() =
   block: # removeDotSegments
     doAssert removeDotSegments("/foo/bar/baz") == "/foo/bar/baz"
     doAssert removeDotSegments("") == "" # empty test
+    doAssert removeDotSegments(".") == "." # trailing period
 
   block: # bug #3207
     doAssert parseUri("http://qq/1").combine(parseUri("https://qqq")).`$` == "https://qqq"