mirror of
https://github.com/rancher/plugins.git
synced 2025-09-06 05:02:46 +00:00
Windows: Updates Windows Vendoring
Updates windows dependent libraries for vendoing.
This commit is contained in:
39
vendor/github.com/Microsoft/hcsshim/cmd/runhcs/utils_test.go
generated
vendored
Normal file
39
vendor/github.com/Microsoft/hcsshim/cmd/runhcs/utils_test.go
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/Microsoft/hcsshim/internal/runhcs"
|
||||
)
|
||||
|
||||
func Test_AbsPathOrEmpty(t *testing.T) {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
t.Fatalf("failed to get test wd: %v", err)
|
||||
}
|
||||
|
||||
tests := []string{
|
||||
"",
|
||||
runhcs.SafePipePrefix + "test",
|
||||
runhcs.SafePipePrefix + "test with spaces",
|
||||
"test",
|
||||
"C:\\test..\\test",
|
||||
}
|
||||
expected := []string{
|
||||
"",
|
||||
runhcs.SafePipePrefix + "test",
|
||||
runhcs.SafePipePrefix + "test%20with%20spaces",
|
||||
wd + "\\test",
|
||||
"C:\\test..\\test",
|
||||
}
|
||||
for i, test := range tests {
|
||||
actual, err := absPathOrEmpty(test)
|
||||
if err != nil {
|
||||
t.Fatalf("absPathOrEmpty: error '%v'", err)
|
||||
}
|
||||
if actual != expected[i] {
|
||||
t.Fatalf("absPathOrEmpty: actual '%s' != '%s'", actual, expected[i])
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user