Add linux counterpart test

This commit is contained in:
Mathias Fredriksson 2022-10-18 11:19:29 +03:00
parent d0f04135b1
commit b3f237d7ad
1 changed files with 8 additions and 2 deletions

View File

@ -305,6 +305,12 @@ func Test_toLocalPath(t *testing.T) {
args: args{workDir: cleanPath("/home/user"), p: "/file"},
want: "/file",
},
{
name: "workdir and non-unixy path on Unix prefixes workdir",
goos: "linux",
args: args{workDir: cleanPath("/home/user"), p: "C:\\file"},
want: "/home/user/C:\\file",
},
{
name: "workdir and empty path on Windows",
goos: "windows",
@ -338,8 +344,8 @@ func Test_toLocalPath(t *testing.T) {
{
name: "workdir and non-unixy path on Windows prefixes workdir",
goos: "windows",
args: args{workDir: cleanPath("C:\\Users\\User"), p: "C:\file"},
want: "C:\\Users\\User\\C:\file",
args: args{workDir: cleanPath("C:\\Users\\User"), p: "C:\\file"},
want: "C:\\Users\\User\\C:\\file",
},
}
for _, tt := range tests {