drone-scp/path_windows_test.go

28 lines
444 B
Go
Raw Normal View History

2017-01-03 16:59:00 +08:00
package main
2019-05-11 16:34:36 +08:00
import (
"testing"
)
2017-01-03 16:59:00 +08:00
func TestGetRealPath(t *testing.T) {
type args struct {
path string
}
tests := []struct {
name string
args args
want string
}{
{
"Test Windows Path",
"C:\\Users\\appleboy\\test.txt",
"/C/Users/appleboy/test.txt",
},
2017-01-03 16:59:00 +08:00
}
for _, tt := range tests {
if got := getRealPath(tt.args.path); got != tt.want {
t.Errorf("%q. getRealPath() = %v, want %v", tt.name, got, tt.want)
}
}
}