summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/stdlib/tgetfileinfo.nim24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/stdlib/tgetfileinfo.nim b/tests/stdlib/tgetfileinfo.nim
index 780853afc..1c897b702 100644
--- a/tests/stdlib/tgetfileinfo.nim
+++ b/tests/stdlib/tgetfileinfo.nim
@@ -104,23 +104,31 @@ proc testGetFileInfo =
 
     createDir(dirPath)
     writeFile(filePath, "")
-    createSymlink(dirPath, linkDirPath)
-    createSymlink(filePath, linkFilePath)
+    when defined(posix):
+      createSymlink(dirPath, linkDirPath)
+      createSymlink(filePath, linkFilePath)
 
     let
       dirInfo = getFileInfo(dirPath)
       fileInfo = getFileInfo(filePath)
-      linkDirInfo = getFileInfo(linkDirPath, followSymlink = false)
-      linkFileInfo = getFileInfo(linkFilePath, followSymlink = false)
+    when defined(posix):
+      let
+        linkDirInfo = getFileInfo(linkDirPath, followSymlink = false)
+        linkFileInfo = getFileInfo(linkFilePath, followSymlink = false)
 
     echo dirInfo.kind
     echo fileInfo.kind
-    echo linkDirInfo.kind
-    echo linkFileInfo.kind
+    when defined(posix):
+      echo linkDirInfo.kind
+      echo linkFileInfo.kind
+    else:
+      echo pcLinkToDir
+      echo pcLinkToFile
 
     removeDir(dirPath)
     removeFile(filePath)
-    removeFile(linkDirPath)
-    removeFile(linkFilePath)
+    when defined(posix):
+      removeFile(linkDirPath)
+      removeFile(linkFilePath)
 
 testGetFileInfo()