summary refs log tree commit diff stats
path: root/tests/osproc/tworkingdir.nim
blob: 84ba3375c18275516799b28ae92385a4d62118f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  file: "tworkingdir.nim"
  output: ""
"""

import osproc, os
when defined(windows):
  # Windows don't have this issue, so we won't test it.
  discard
else:
  let dir1 = getCurrentDir()
  var process = startProcess("/usr/bin/env", "/usr/bin", ["true"])
  let dir2 = getCurrentDir()
  discard process.waitForExit()
  process.close()
  doAssert(dir1 == dir2, $dir1 & " != " & $dir2)