fix testament regression: installed testament works again with testament r path (#16767)

* fix testament regression: installed testament works again with testament r path

* fixup
This commit is contained in:
Timothee Cour 2021-01-20 05:04:08 -08:00 • committed by GitHub
commit 2b5841cd2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 11 deletions

View file

@ -0,0 +1,9 @@
import stdtest/specialpaths
import std/os
block: # splitTestFile
doAssert splitTestFile("tests/fakedir/tfakename.nim") == ("fakedir", "tests/fakedir/tfakename.nim".unixToNativePath)
doAssert splitTestFile("/pathto/tests/fakedir/tfakename.nim") == ("fakedir", "/pathto/tests/fakedir/tfakename.nim".unixToNativePath)
doAssert splitTestFile(getCurrentDir() / "tests/fakedir/tfakename.nim") == ("fakedir", "tests/fakedir/tfakename.nim".unixToNativePath)
doAssert splitTestFile(getCurrentDir() / "sub/tests/fakedir/tfakename.nim") == ("fakedir", "sub/tests/fakedir/tfakename.nim".unixToNativePath)
doAssertRaises(AssertionDefect): discard splitTestFile("testsbad/fakedir/tfakename.nim")
doAssertRaises(AssertionDefect): discard splitTestFile("tests/tfakename.nim")