Fix path not found message on Windows (#227)
This commit is contained in:
committed by
Thomas Pelletier
parent
c01d1270ff
commit
603baefff9
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@@ -76,7 +77,14 @@ func TestProcessMainReadFromFile(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestProcessMainReadFromMissingFile(t *testing.T) {
|
func TestProcessMainReadFromMissingFile(t *testing.T) {
|
||||||
expectedError := `open /this/file/does/not/exist: no such file or directory
|
var expectedError string
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
expectedError = `open /this/file/does/not/exist: The system cannot find the path specified.
|
||||||
`
|
`
|
||||||
|
} else {
|
||||||
|
expectedError = `open /this/file/does/not/exist: no such file or directory
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
expectProcessMainResults(t, ``, []string{"/this/file/does/not/exist"}, -1, ``, expectedError)
|
expectProcessMainResults(t, ``, []string{"/this/file/does/not/exist"}, -1, ``, expectedError)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user