Add test for invalid input on Windows

This commit is contained in:
Mathias Fredriksson 2022-10-18 11:17:10 +03:00
parent bf40a02d09
commit d0f04135b1
1 changed files with 6 additions and 0 deletions

View File

@ -335,6 +335,12 @@ func Test_toLocalPath(t *testing.T) {
args: args{workDir: cleanPath("C:\\Users\\User"), p: "/C:/file"},
want: "C:\\file",
},
{
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",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {