Thanks to @hollesse 's port of testbed to go (PR #327 ) it is now possible to run most of tests on Windows natively from a PowerShell or cmd prompt. I have tried running them and found the following issues that need to be fixed:
[x] Some tests, like the TestStartNextStay_DoNotWriteLastModifiedFileInCommit_WhenFileIsDeleted use run to run some simple Unix commands. These should be exchanged to the equivalent go os.* calls so they work on Windows as well.
[x] TestGitRootDir and TestGitRootDirWithSymbolicLink compares native paths to the return value of gitRootDir(), which always retuns paths with / separators. We need to convert one side of the equals to match the other on Windows, for example with filepath.FromSlash.
[x] TestStartNextStay_OpenLastModifiedFile uses the Unix touch utility in configuration.OpenCommand. On Windows we need to change it to a Windows equivalent: cmd.exe /C type nul > target.
Thanks to @hollesse 's port of testbed to go (PR #327 ) it is now possible to run most of tests on Windows natively from a PowerShell or cmd prompt. I have tried running them and found the following issues that need to be fixed:
TestStartNextStay_DoNotWriteLastModifiedFileInCommit_WhenFileIsDeleted
userun
to run some simple Unix commands. These should be exchanged to the equivalent goos.*
calls so they work on Windows as well.TestGitRootDir
andTestGitRootDirWithSymbolicLink
compares native paths to the return value ofgitRootDir()
, which always retuns paths with/
separators. We need to convert one side of the equals to match the other on Windows, for example withfilepath.FromSlash
.TestStartNextStay_OpenLastModifiedFile
uses the Unixtouch
utility inconfiguration.OpenCommand
. On Windows we need to change it to a Windows equivalent:cmd.exe /C type nul > target
.