summary refs log tree commit diff stats
path: root/tests/stdlib/tpaths.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/tpaths.nim')
-rw-r--r--tests/stdlib/tpaths.nim14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/stdlib/tpaths.nim b/tests/stdlib/tpaths.nim
index 082c4937a..edb56209a 100644
--- a/tests/stdlib/tpaths.nim
+++ b/tests/stdlib/tpaths.nim
@@ -6,15 +6,12 @@ import std/paths
 import std/assertions
 import pathnorm
 from std/private/ospaths2 {.all.} import joinPathImpl
-import std/sugar
+import std/[sugar, sets]
 
 
 proc normalizePath*(path: Path; dirSep = DirSep): Path =
   result = Path(pathnorm.normalizePath(path.string, dirSep))
 
-func `==`(x, y: Path): bool =
-  x.string == y.string
-
 func joinPath*(parts: varargs[Path]): Path =
   var estimatedLen = 0
   var state = 0
@@ -231,4 +228,11 @@ block ospaths:
   when doslikeFileSystem:
     doAssert joinPath(Path"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\", Path"..\\..\\VC\\vcvarsall.bat") == r"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat".Path
     doAssert joinPath(Path"C:\\foo", Path"..\\a") == r"C:\a".Path
-    doAssert joinPath(Path"C:\\foo\\", Path"..\\a") == r"C:\a".Path
\ No newline at end of file
+    doAssert joinPath(Path"C:\\foo\\", Path"..\\a") == r"C:\a".Path
+
+
+block: # bug #23663
+  var s: HashSet[Path]
+  s.incl("/a/b/c/..".Path)
+  doAssert "/a/b/".Path in s
+  doAssert "/a/b/c".Path notin s